BUG/MEDIUM: buffers: fix bi_putchr() to correctly advance the pointer

bi_putchr() failed to move the buffer pointer forward. The only user
was the peer handler which was broken, it failed to sync. Thanks to
Herv Commowick for reporting the issue.
This commit is contained in:
Willy Tarreau 2012-05-31 16:37:11 +02:00
parent fa6bac6ec3
commit 743a2d3e14

View File

@ -154,9 +154,7 @@ int bi_putchr(struct buffer *buf, char c)
if (buf->to_forward >= 1) {
if (buf->to_forward != BUF_INFINITE_FORWARD)
buf->to_forward--;
buf->o++;
buf->i--;
buf->flags &= ~BF_OUT_EMPTY;
b_adv(buf, 1);
}
buf->total++;