MINOR: stream-int: factor the SI_ST_EST state test into si_chk_rcv()

This test is made in each implementation of the function, better to
merge it.
This commit is contained in:
Willy Tarreau 2018-11-07 14:59:45 +01:00
parent 96aadd5c55
commit 1bdb598a55
2 changed files with 6 additions and 3 deletions

View File

@ -396,6 +396,9 @@ static inline void si_chk_rcv(struct stream_interface *si)
if (!(si->flags & SI_FL_WANT_PUT))
return;
if (si->state > SI_ST_EST)
return;
si->ops->chk_rcv(si);
}

View File

@ -248,7 +248,7 @@ static void stream_int_chk_rcv(struct stream_interface *si)
__FUNCTION__,
si, si->state, ic->flags, si_oc(si)->flags);
if (unlikely(si->state != SI_ST_EST || (ic->flags & (CF_SHUTR|CF_DONT_READ))))
if (ic->flags & (CF_SHUTR|CF_DONT_READ))
return;
if (!channel_may_recv(ic) || ic->pipe) {
@ -960,7 +960,7 @@ static void stream_int_chk_rcv_conn(struct stream_interface *si)
{
struct channel *ic = si_ic(si);
if (unlikely(si->state > SI_ST_EST || (ic->flags & CF_SHUTR)))
if (ic->flags & CF_SHUTR)
return;
if ((ic->flags & CF_DONT_READ) || !channel_may_recv(ic)) {
@ -1498,7 +1498,7 @@ static void stream_int_chk_rcv_applet(struct stream_interface *si)
__FUNCTION__,
si, si->state, ic->flags, si_oc(si)->flags);
if (unlikely(si->state != SI_ST_EST || (ic->flags & (CF_SHUTR|CF_DONT_READ))))
if (ic->flags & (CF_SHUTR|CF_DONT_READ))
return;
if (channel_may_recv(ic) && !ic->pipe) {