mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-01-18 07:11:00 +01:00
MEDIUM: stream-int: fix the si_cant_put() calls used for buffer readiness
A number of calls to si_cant_put() were used in fact to request being called back once a buffer is available. These ones are not needed anymore since si_alloc_ibuf() already sets the SI_FL_RXBLK_BUFF flag when called in appctx context. Those called with a foreign stream-int are simply turned to si_rx_buff_blk().
This commit is contained in:
parent
3367d4156d
commit
4b962a4179
@ -644,7 +644,9 @@ static void http_cache_io_handler(struct appctx *appctx)
|
||||
|
||||
/* Check if the input buffer is avalaible. */
|
||||
if (res->buf.size == 0) {
|
||||
si_cant_put(si);
|
||||
/* buf.size==0 means we failed to get a buffer and were
|
||||
* already subscribed to a wait list to get a buffer.
|
||||
*/
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
@ -550,7 +550,9 @@ static void cli_io_handler(struct appctx *appctx)
|
||||
|
||||
/* Check if the input buffer is avalaible. */
|
||||
if (res->buf.size == 0) {
|
||||
si_cant_put(si);
|
||||
/* buf.size==0 means we failed to get a buffer and were
|
||||
* already subscribed to a wait list to get a buffer.
|
||||
*/
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
@ -2942,7 +2942,7 @@ __LJMP static int hlua_channel_append_yield(lua_State *L, int status, lua_KConte
|
||||
* the request buffer if its not required.
|
||||
*/
|
||||
if (chn->buf.size == 0) {
|
||||
si_cant_put(chn_prod(chn));
|
||||
si_rx_buff_blk(chn_prod(chn));
|
||||
MAY_LJMP(hlua_yieldk(L, 0, 0, hlua_channel_append_yield, TICK_ETERNITY, 0));
|
||||
}
|
||||
|
||||
@ -3036,7 +3036,7 @@ __LJMP static int hlua_channel_send_yield(lua_State *L, int status, lua_KContext
|
||||
* the request buffer if its not required.
|
||||
*/
|
||||
if (chn->buf.size == 0) {
|
||||
si_cant_put(chn_prod(chn));
|
||||
si_rx_buff_blk(chn_prod(chn));
|
||||
MAY_LJMP(hlua_yieldk(L, 0, 0, hlua_channel_send_yield, TICK_ETERNITY, 0));
|
||||
}
|
||||
|
||||
|
||||
@ -3049,7 +3049,9 @@ static void http_stats_io_handler(struct appctx *appctx)
|
||||
|
||||
/* Check if the input buffer is avalaible. */
|
||||
if (res->buf.size == 0) {
|
||||
si_cant_put(si);
|
||||
/* already subscribed, we'll be called later once the buffer is
|
||||
* available.
|
||||
*/
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user