]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: channel: do not report full when buf_empty is present on a channel
authorWilly Tarreau <w@1wt.eu>
Fri, 28 Nov 2014 19:54:13 +0000 (20:54 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 24 Dec 2014 22:47:32 +0000 (23:47 +0100)
commit4428a29e52544894d631122b598deccd37e59804
tree0e5c039dc1cfa6d49f42b2824602f6d7e02f48b9
parentf2f7d6b27bd01439e02f6d5260e440029822f3ff
MEDIUM: channel: do not report full when buf_empty is present on a channel

Till now we'd consider a buffer full even if it had size==0 due to pointing
to buf.size. Now we change this : if buf_wanted is present, it means that we
have already tried to allocate a buffer but failed. Thus the buffer must be
considered full so that we stop trying to poll for reads on it. Otherwise if
it's empty, it's buf_empty and we report !full since we may allocate it on
the fly.
include/common/buffer.h
include/proto/channel.h