mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-04 03:02:07 +00:00
[MINOR] ensure that buffer_feed() and buffer_skip() set BF_*_PARTIAL
It's important that these functions set these flags themselves, otherwise the callers will always have to do this, and there is no valid reason for not doing it.
This commit is contained in:
parent
8280d64961
commit
fb0e9209a9
@ -349,6 +349,9 @@ static inline void buffer_skip(struct buffer *buf, int len)
|
||||
buf->send_max -= len;
|
||||
if (!buf->send_max && !buf->pipe)
|
||||
buf->flags |= BF_OUT_EMPTY;
|
||||
|
||||
/* notify that some data was written to the SI from the buffer */
|
||||
buf->flags |= BF_WRITE_PARTIAL;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -119,6 +119,8 @@ int buffer_feed(struct buffer *buf, const char *str, int len)
|
||||
if (buf->l >= buf->max_len)
|
||||
buf->flags |= BF_FULL;
|
||||
|
||||
/* notify that some data was read from the SI into the buffer */
|
||||
buf->flags |= BF_READ_PARTIAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user