diff options
author | Bernhard Schmidt <berni@debian.org> | 2020-08-15 21:29:50 +0200 |
---|---|---|
committer | Bernhard Schmidt <berni@debian.org> | 2020-08-15 21:29:50 +0200 |
commit | 1079962e4c06f88a54e50d997c1b7e84303d30b4 (patch) | |
tree | 4d019426928435425214ccedd6f89b70dbdf035d /src/openvpn/error.c | |
parent | 620785fe268a1221c1ba7a9cb5a70f3140a4f1ca (diff) |
New upstream version 2.5~beta1upstream/2.5_beta1
Diffstat (limited to 'src/openvpn/error.c')
-rw-r--r-- | src/openvpn/error.c | 18 |
1 files changed, 8 insertions, 10 deletions
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(); |