mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-10 00:57:02 +02:00
MINOR: conn_stream: test the various ops functions before calling them
We currently call all ->shutr, ->chk_snd etc from ->ops unconditionally, while the ->wake() call from data_cb is checked. Better check ops as well for consistency, this will help get them merged.
This commit is contained in:
parent
f3ae34b67d
commit
c086960a03
@ -275,12 +275,14 @@ static inline void cs_must_kill_conn(struct stconn *cs)
|
||||
/* Sends a shutr to the endpoint using the data layer */
|
||||
static inline void cs_shutr(struct stconn *cs)
|
||||
{
|
||||
if (likely(cs->ops->shutr))
|
||||
cs->ops->shutr(cs);
|
||||
}
|
||||
|
||||
/* Sends a shutw to the endpoint using the data layer */
|
||||
static inline void cs_shutw(struct stconn *cs)
|
||||
{
|
||||
if (likely(cs->ops->shutw))
|
||||
cs->ops->shutw(cs);
|
||||
}
|
||||
|
||||
@ -302,12 +304,14 @@ static inline void cs_chk_rcv(struct stconn *cs)
|
||||
return;
|
||||
|
||||
sc_ep_set(cs, SE_FL_RX_WAIT_EP);
|
||||
if (likely(cs->ops->chk_rcv))
|
||||
cs->ops->chk_rcv(cs);
|
||||
}
|
||||
|
||||
/* Calls chk_snd on the endpoint using the data layer */
|
||||
static inline void cs_chk_snd(struct stconn *cs)
|
||||
{
|
||||
if (likely(cs->ops->chk_snd))
|
||||
cs->ops->chk_snd(cs);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user