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