mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-17 19:16:56 +00:00
MINOR: connection: add cs_set_error() to set the error bits
Depending on the CS_FL_EOS status, we either set CS_FL_ERR_PENDING or CS_FL_ERROR at various places. Let's have a generic function to do this.
This commit is contained in:
parent
f830f018cf
commit
e9f4301f0f
@ -501,6 +501,15 @@ static inline void cs_close(struct conn_stream *cs)
|
||||
cs->flags = CS_FL_NONE;
|
||||
}
|
||||
|
||||
/* sets CS_FL_ERROR or CS_FL_ERR_PENDING on the cs */
|
||||
static inline void cs_set_error(struct conn_stream *cs)
|
||||
{
|
||||
if (cs->flags & CS_FL_EOS)
|
||||
cs->flags |= CS_FL_ERROR;
|
||||
else
|
||||
cs->flags |= CS_FL_REOS | CS_FL_ERR_PENDING;
|
||||
}
|
||||
|
||||
/* detect sock->data read0 transition */
|
||||
static inline int conn_xprt_read0_pending(struct connection *c)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user