From 1079962e4c06f88a54e50d997c1b7e84303d30b4 Mon Sep 17 00:00:00 2001 From: Bernhard Schmidt Date: Sat, 15 Aug 2020 21:29:50 +0200 Subject: New upstream version 2.5~beta1 --- src/openvpn/error.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'src/openvpn/error.c') diff --git a/src/openvpn/error.c b/src/openvpn/error.c index bc14e8c..d6247fe 100644 --- a/src/openvpn/error.c +++ b/src/openvpn/error.c @@ -31,6 +31,7 @@ #include "error.h" #include "buffer.h" +#include "init.h" #include "misc.h" #include "win32.h" #include "socket.h" @@ -342,9 +343,9 @@ x_msg_va(const unsigned int flags, const char *format, va_list arglist) struct timeval tv; gettimeofday(&tv, NULL); - fprintf(fp, "%"PRIi64".%06lu %x %s%s%s%s", + fprintf(fp, "%" PRIi64 ".%06ld %x %s%s%s%s", (int64_t)tv.tv_sec, - (unsigned long)tv.tv_usec, + (long)tv.tv_usec, flags, prefix, prefix_sep, @@ -687,7 +688,10 @@ x_check_status(int status, } #elif defined(_WIN32) /* get possible driver error from TAP-Windows driver */ - extended_msg = tap_win_getinfo(tt, &gc); + if (tuntap_defined(tt)) + { + extended_msg = tap_win_getinfo(tt, &gc); + } #endif if (!ignore_sys_error(my_errno)) { @@ -734,18 +738,12 @@ openvpn_exit(const int status) { if (!forked) { - void tun_abort(); - -#ifdef ENABLE_PLUGIN - void plugin_abort(void); - -#endif - tun_abort(); #ifdef _WIN32 uninit_win32(); #endif + remove_pid_file(); close_syslog(); -- cgit v1.2.3