]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: channel: don't always set CF_WAKE_WRITE on bi_put*
authorWilly Tarreau <w@1wt.eu>
Fri, 13 Mar 2015 13:00:47 +0000 (14:00 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 13 Mar 2015 13:00:47 +0000 (14:00 +0100)
commitbc18da17aaba8db4dbc08471d4cc333cea08b41a
tree73ee9140e1f852988755f5723a71161cfff4cec6
parent6b5a9c23ce082807aabb20d1b03b76b24eb35e92
MEDIUM: channel: don't always set CF_WAKE_WRITE on bi_put*

It was inappropriate to put this flag on every failed write into an
input buffer because it depends where it happens. When it's in the
context of an analyser (eg: hlua) it makes sense. When it's in the
context of an applet (eg: dumpstats), it does not make sense, and
it only happens to work because currently applets are scheduled by
the sessions. The proper solution for applets would be to add the
flag SI_FL_WAIT_ROOM on the stream interface.

Thus, we now don't set any flag anymore in bi_put* and it's up to the
caller to either set CF_WAKE_WRITE on the channel or SI_FL_WAIT_ROOM
on the stream interface. Changes were applied to hlua, peers and
dumpstats.
src/channel.c
src/dumpstats.c
src/hlua.c
src/peers.c