Always compact the buffer if it has reached MAXBUFSIZE.
This commit is contained in:
parent
90c7fafe59
commit
931e30f91a
3 changed files with 5 additions and 5 deletions
|
|
@ -85,10 +85,10 @@ bool receive_meta(connection_t *c) {
|
|||
- If not, keep stuff in buffer and exit.
|
||||
*/
|
||||
|
||||
buffer_compact(&c->inbuf);
|
||||
buffer_compact(&c->inbuf, MAXBUFSIZE);
|
||||
|
||||
if(sizeof inbuf <= c->inbuf.len) {
|
||||
logger(LOG_ERR, "Input buffer full for %s (%s)\n");
|
||||
logger(LOG_ERR, "Input buffer full for %s (%s)\n", c, c->hostname);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue