BUG/MEDIUM: stconn: Don't wakeup applet for send if it won't consume data
in .chk_snd applet callback function, we must not wake up an applet if SE_FL_WONT_CONSUME flag is set. Indeed, if an applet explicitly specify it will not consume any outgoing data, it is useless to wake it up when more data are sent. Note the applet may still be woken up for another reason. In this case SE_FL_WONT_CONSUME flag will be removed. It is the applet responsibility to set it again, if necessary. This patch must be backported to 2.6 after an observation period. On earlier versions, the bug probably exists too. However, because a massive refactoring was performed in 2.6, the patch will have to be adapted and carefully reviewed/tested if it is backported..
This commit is contained in:
parent
e4b4019280
commit
04f03e15c3
@ -981,9 +981,8 @@ static void sc_app_chk_snd_applet(struct stconn *sc)
|
||||
if (unlikely(sc->state != SC_ST_EST || (oc->flags & CF_SHUTW)))
|
||||
return;
|
||||
|
||||
/* we only wake the applet up if it was waiting for some data */
|
||||
|
||||
if (!sc_ep_test(sc, SE_FL_WAIT_DATA))
|
||||
/* we only wake the applet up if it was waiting for some data and is ready to consume it */
|
||||
if (!sc_ep_test(sc, SE_FL_WAIT_DATA) || sc_ep_test(sc, SE_FL_WONT_CONSUME))
|
||||
return;
|
||||
|
||||
if (!tick_isset(oc->wex))
|
||||
|
Loading…
x
Reference in New Issue
Block a user