Merge branch 'winwarnings' of https://github.com/dechamps/tinc into 1.1
authorGuus Sliepen <guus@tinc-vpn.org>
Sat, 12 Jul 2014 20:19:45 +0000 (22:19 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Sat, 12 Jul 2014 20:19:45 +0000 (22:19 +0200)
src/device.h
src/mingw/device.c
src/net_packet.c
src/script.c
src/top.c

index ad91a0e..8046a25 100644 (file)
@@ -27,11 +27,6 @@ extern int device_fd;
 extern char *device;
 extern char *iface;
 
-extern uint64_t device_in_packets;
-extern uint64_t device_in_bytes;
-extern uint64_t device_out_packets;
-extern uint64_t device_out_bytes;
-
 typedef struct devops_t {
        bool (*setup)(void);
        void (*close)(void);
index 33b13da..b6dffbc 100644 (file)
@@ -43,9 +43,6 @@ char *device = NULL;
 char *iface = NULL;
 static char *device_info = NULL;
 
-static uint64_t device_total_in = 0;
-static uint64_t device_total_out = 0;
-
 extern char *myport;
 
 static void device_issue_read() {
@@ -60,7 +57,7 @@ static void device_issue_read() {
        }
 }
 
-static void device_handle_read(void *data) {
+static void device_handle_read(void *data, int flags) {
        ResetEvent(device_read_overlapped.hEvent);
 
        DWORD len;
@@ -89,7 +86,6 @@ static bool setup_device(void) {
        bool found = false;
 
        int err;
-       HANDLE thread;
 
        get_config_string(lookup_config(config_tree, "Device"), &device);
        get_config_string(lookup_config(config_tree, "Interface"), &iface);
@@ -235,8 +231,6 @@ static bool write_packet(vpn_packet_t *packet) {
                return false;
        }
 
-       device_total_out += packet->len;
-
        return true;
 }
 
index 31c19b7..4ec70fa 100644 (file)
@@ -628,8 +628,8 @@ static void send_udppacket(node_t *n, vpn_packet_t *origpkt) {
        size_t outlen;
 #if defined(SOL_IP) && defined(IP_TOS)
        static int priority = 0;
-#endif
        int origpriority = origpkt->priority;
+#endif
 
        if(!n->status.reachable) {
                logger(DEBUG_TRAFFIC, LOG_INFO, "Trying to send UDP packet to unreachable node %s (%s)", n->name, n->hostname);
index 9a43d53..6389cb4 100644 (file)
@@ -49,7 +49,7 @@ bool execute_script(const char *name, char **envp) {
                        if(q) {
                                memcpy(ext, p, q - p);
                                ext[q - p] = 0;
-                               *q++;
+                               q++;
                        } else {
                                strcpy(ext, p);
                        }
index 2824261..40b8047 100644 (file)
--- a/src/top.c
+++ b/src/top.c
@@ -21,6 +21,7 @@
 
 #ifdef HAVE_CURSES
 
+#undef KEY_EVENT  /* There are conflicting declarations for KEY_EVENT in Windows wincon.h and curses.h. */
 #include <curses.h>
 
 #include "control_common.h"