]> git.meshlink.io Git - meshlink/blobdiff - src/meta.c
Always compact the buffer if it has reached MAXBUFSIZE.
[meshlink] / src / meta.c
index cf6b9d446d82067ee3739afdbecd25bce1247313..5735da7e8d1b60f180d7174c97030f444c8442e7 100644 (file)
@@ -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;
        }