From: Guus Sliepen Date: Sat, 12 Jul 2014 20:19:45 +0000 (+0200) Subject: Merge branch 'winwarnings' of https://github.com/dechamps/tinc into 1.1 X-Git-Tag: release-1.1pre11~63 X-Git-Url: https://www.tinc-vpn.org/git/browse?a=commitdiff_plain;h=53036a58790168e18f524bd923f9a7d34691ba2d;hp=ddd0cd47bc0bb3478b7d250192248a1e3aa2a243;p=tinc Merge branch 'winwarnings' of https://github.com/dechamps/tinc into 1.1 --- diff --git a/src/device.h b/src/device.h index ad91a0e6..8046a255 100644 --- a/src/device.h +++ b/src/device.h @@ -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); diff --git a/src/mingw/device.c b/src/mingw/device.c index 33b13da6..b6dffbc9 100644 --- a/src/mingw/device.c +++ b/src/mingw/device.c @@ -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; } diff --git a/src/net_packet.c b/src/net_packet.c index 31c19b7a..4ec70fa6 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -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); diff --git a/src/script.c b/src/script.c index 9a43d531..6389cb4b 100644 --- a/src/script.c +++ b/src/script.c @@ -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); } diff --git a/src/top.c b/src/top.c index 2824261c..40b80479 100644 --- 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 #include "control_common.h"