]> git.meshlink.io Git - meshlink/commitdiff
Don't treat packets coming in via TCP as having zero length.
authorGuus Sliepen <guus@tinc-vpn.org>
Thu, 2 Jun 2011 19:16:57 +0000 (21:16 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Thu, 2 Jun 2011 19:16:57 +0000 (21:16 +0200)
src/meta.c

index 849a0c6947a409807c396bf769c28567d5aa4360..29dd824042754358bba1a0efaec4698b782e70b1 100644 (file)
@@ -137,8 +137,8 @@ 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);
+                                       c->tcplen = 0;
                                        continue;
                                } else {
                                        break;