Read error counter must be static.
authorGuus Sliepen <guus@tinc-vpn.org>
Tue, 2 Nov 2010 13:23:43 +0000 (14:23 +0100)
committerGuus Sliepen <guus@tinc-vpn.org>
Tue, 2 Nov 2010 13:23:43 +0000 (14:23 +0100)
src/net.c

index bed779a..08e3cad 100644 (file)
--- a/src/net.c
+++ b/src/net.c
@@ -280,7 +280,7 @@ static void check_network_activity(fd_set * readset, fd_set * writeset) {
        int result, i;
        socklen_t len = sizeof(result);
        vpn_packet_t packet;
-       int errors = 0;
+       static int errors = 0;
 
        /* check input from kernel */
        if(device_fd >= 0 && FD_ISSET(device_fd, readset)) {