summaryrefslogtreecommitdiff
path: root/src/openvpn/sig.c
diff options
context:
space:
mode:
authorBernhard Schmidt <berni@debian.org>2020-09-01 16:52:17 +0200
committerBernhard Schmidt <berni@debian.org>2020-09-01 16:52:17 +0200
commit9fc3b98112217f2d92a67977dbde0987cc7a1803 (patch)
tree29fcc8654ee65d9dd89ade797bea2f3d9dfd9cfd /src/openvpn/sig.c
parenta8758c0e03eed188dcb9da0e4fd781a67c25bf1e (diff)
parent69b02b1f7fd609d84ace13ab04697158de2418a9 (diff)
Merge branch 'debian/experimental-2.5'
Diffstat (limited to 'src/openvpn/sig.c')
-rw-r--r--src/openvpn/sig.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/openvpn/sig.c b/src/openvpn/sig.c
index d7f2abb..24a2878 100644
--- a/src/openvpn/sig.c
+++ b/src/openvpn/sig.c
@@ -317,8 +317,11 @@ print_status(const struct context *c, struct status_output *so)
#ifdef _WIN32
if (tuntap_defined(c->c1.tuntap))
{
- status_printf(so, "TAP-WIN32 driver status,\"%s\"",
- tap_win_getinfo(c->c1.tuntap, &gc));
+ const char *extended_msg = tap_win_getinfo(c->c1.tuntap, &gc);
+ if (extended_msg)
+ {
+ status_printf(so, "TAP-WIN32 driver status,\"%s\"", extended_msg);
+ }
}
#endif
@@ -327,7 +330,6 @@ print_status(const struct context *c, struct status_output *so)
gc_free(&gc);
}
-#ifdef ENABLE_OCC
/*
* Handle the triggering and time-wait of explicit
* exit notification.
@@ -364,7 +366,6 @@ process_explicit_exit_notification_timer_wakeup(struct context *c)
}
}
}
-#endif /* ifdef ENABLE_OCC */
/*
* Process signals
@@ -392,14 +393,12 @@ static bool
process_sigterm(struct context *c)
{
bool ret = true;
-#ifdef ENABLE_OCC
if (c->options.ce.explicit_exit_notification
&& !c->c2.explicit_exit_notification_time_wait)
{
process_explicit_exit_notification_init(c);
ret = false;
}
-#endif
return ret;
}
@@ -412,7 +411,6 @@ static bool
ignore_restart_signals(struct context *c)
{
bool ret = false;
-#ifdef ENABLE_OCC
if ( (c->sig->signal_received == SIGUSR1 || c->sig->signal_received == SIGHUP)
&& event_timeout_defined(&c->c2.explicit_exit_notification_interval) )
{
@@ -431,7 +429,6 @@ ignore_restart_signals(struct context *c)
ret = false;
}
}
-#endif
return ret;
}