]> git.meshlink.io Git - meshlink/commitdiff
Reset tcplen after use.
authorGuus Sliepen <guus@tinc-vpn.org>
Sun, 22 May 2011 12:02:27 +0000 (14:02 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Sun, 22 May 2011 12:02:27 +0000 (14:02 +0200)
src/meta.c

index 5735da7e8d1b60f180d7174c97030f444c8442e7..e56c86f9124d585966759fb63b9a8ae5a4b6f267 100644 (file)
@@ -137,6 +137,7 @@ bool receive_meta(connection_t *c) {
                        if(c->tcplen) {
                                char *tcpbuffer = buffer_read(&c->inbuf, c->tcplen);
                                if(tcpbuffer) {
+                                       c->tcplen = 0;
                                        receive_tcppacket(c, tcpbuffer, c->tcplen);
                                        continue;
                                } else {