- 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;
}
if(c->tcplen) {
char *tcpbuffer = buffer_read(&c->inbuf, c->tcplen);
if(tcpbuffer) {
+ c->tcplen = 0;
receive_tcppacket(c, tcpbuffer, c->tcplen);
continue;
} else {