[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:
Willy Tarreau 2009-09-23 23:47:55 +02:00
parent 8280d64961
commit fb0e9209a9
2 changed files with 5 additions and 0 deletions

View File

@ -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;
}
/*

View File

@ -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;
}