X-Git-Url: http://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fmingw%2Fdevice.c;h=85c0c7b1475744a0a9ff0483b9f1419140bfe865;hb=ed1d0878afe53032a4b63e87afd4a435015cf5de;hp=abe544ee8f913d2af7b8d4635c64c7348da88a82;hpb=cdda0388a82eb44ff260e25c0902794c8db9643a;p=tinc diff --git a/src/mingw/device.c b/src/mingw/device.c index abe544ee..85c0c7b1 100644 --- a/src/mingw/device.c +++ b/src/mingw/device.c @@ -213,10 +213,11 @@ static bool setup_device(void) { } static void close_device(void) { - CloseHandle(device_handle); + CloseHandle(device_handle); device_handle = INVALID_HANDLE_VALUE; - free(device); - free(iface); + free(device); device = NULL; + free(iface); iface = NULL; + device_info = NULL; } static bool read_packet(vpn_packet_t *packet) { @@ -240,16 +241,9 @@ static bool write_packet(vpn_packet_t *packet) { return true; } -static void dump_device_stats(void) { - logger(DEBUG_ALWAYS, LOG_DEBUG, "Statistics for %s %s:", device_info, device); - logger(DEBUG_ALWAYS, LOG_DEBUG, " total bytes in: %10"PRIu64, device_total_in); - logger(DEBUG_ALWAYS, LOG_DEBUG, " total bytes out: %10"PRIu64, device_total_out); -} - const devops_t os_devops = { .setup = setup_device, .close = close_device, .read = read_packet, .write = write_packet, - .dump_stats = dump_device_stats, };