Merge branch 'winwarnings' of https://github.com/dechamps/tinc into 1.1
This commit is contained in:
commit
53036a5879
5 changed files with 4 additions and 14 deletions
|
@ -27,11 +27,6 @@ extern int device_fd;
|
||||||
extern char *device;
|
extern char *device;
|
||||||
extern char *iface;
|
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 {
|
typedef struct devops_t {
|
||||||
bool (*setup)(void);
|
bool (*setup)(void);
|
||||||
void (*close)(void);
|
void (*close)(void);
|
||||||
|
|
|
@ -43,9 +43,6 @@ char *device = NULL;
|
||||||
char *iface = NULL;
|
char *iface = NULL;
|
||||||
static char *device_info = NULL;
|
static char *device_info = NULL;
|
||||||
|
|
||||||
static uint64_t device_total_in = 0;
|
|
||||||
static uint64_t device_total_out = 0;
|
|
||||||
|
|
||||||
extern char *myport;
|
extern char *myport;
|
||||||
|
|
||||||
static void device_issue_read() {
|
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);
|
ResetEvent(device_read_overlapped.hEvent);
|
||||||
|
|
||||||
DWORD len;
|
DWORD len;
|
||||||
|
@ -89,7 +86,6 @@ static bool setup_device(void) {
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
|
||||||
int err;
|
int err;
|
||||||
HANDLE thread;
|
|
||||||
|
|
||||||
get_config_string(lookup_config(config_tree, "Device"), &device);
|
get_config_string(lookup_config(config_tree, "Device"), &device);
|
||||||
get_config_string(lookup_config(config_tree, "Interface"), &iface);
|
get_config_string(lookup_config(config_tree, "Interface"), &iface);
|
||||||
|
@ -235,8 +231,6 @@ static bool write_packet(vpn_packet_t *packet) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
device_total_out += packet->len;
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -628,8 +628,8 @@ static void send_udppacket(node_t *n, vpn_packet_t *origpkt) {
|
||||||
size_t outlen;
|
size_t outlen;
|
||||||
#if defined(SOL_IP) && defined(IP_TOS)
|
#if defined(SOL_IP) && defined(IP_TOS)
|
||||||
static int priority = 0;
|
static int priority = 0;
|
||||||
#endif
|
|
||||||
int origpriority = origpkt->priority;
|
int origpriority = origpkt->priority;
|
||||||
|
#endif
|
||||||
|
|
||||||
if(!n->status.reachable) {
|
if(!n->status.reachable) {
|
||||||
logger(DEBUG_TRAFFIC, LOG_INFO, "Trying to send UDP packet to unreachable node %s (%s)", n->name, n->hostname);
|
logger(DEBUG_TRAFFIC, LOG_INFO, "Trying to send UDP packet to unreachable node %s (%s)", n->name, n->hostname);
|
||||||
|
|
|
@ -49,7 +49,7 @@ bool execute_script(const char *name, char **envp) {
|
||||||
if(q) {
|
if(q) {
|
||||||
memcpy(ext, p, q - p);
|
memcpy(ext, p, q - p);
|
||||||
ext[q - p] = 0;
|
ext[q - p] = 0;
|
||||||
*q++;
|
q++;
|
||||||
} else {
|
} else {
|
||||||
strcpy(ext, p);
|
strcpy(ext, p);
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
#ifdef HAVE_CURSES
|
#ifdef HAVE_CURSES
|
||||||
|
|
||||||
|
#undef KEY_EVENT /* There are conflicting declarations for KEY_EVENT in Windows wincon.h and curses.h. */
|
||||||
#include <curses.h>
|
#include <curses.h>
|
||||||
|
|
||||||
#include "control_common.h"
|
#include "control_common.h"
|
||||||
|
|
Loading…
Reference in a new issue