summaryrefslogtreecommitdiff
path: root/src/vpn
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-04-30 08:17:37 +0000
committerChristian Grothoff <christian@grothoff.org>2016-04-30 08:17:37 +0000
commit95f9076a2139f5fb042b944a0658b6cda2fa35db (patch)
treeb0826a2a1dcf812e6b4450fe6b05d47cd53ae49d /src/vpn
parent7746f68db77b9ca3c4aaca24ab2ce5253461240b (diff)
implementing new scheduler shutdown semantics
Diffstat (limited to 'src/vpn')
-rw-r--r--src/vpn/gnunet-service-vpn.c5
-rw-r--r--src/vpn/gnunet-vpn.c7
2 files changed, 6 insertions, 6 deletions
diff --git a/src/vpn/gnunet-service-vpn.c b/src/vpn/gnunet-service-vpn.c
index 58eda367f..2c3ac72fa 100644
--- a/src/vpn/gnunet-service-vpn.c
+++ b/src/vpn/gnunet-service-vpn.c
@@ -3099,9 +3099,8 @@ run (void *cls,
&message_token, NULL, NULL);
nc = GNUNET_SERVER_notification_context_create (server, 1);
GNUNET_SERVER_add_handlers (server, service_handlers);
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
- &cleanup,
- NULL);
+ GNUNET_SCHEDULER_add_shutdown (&cleanup,
+ NULL);
}
diff --git a/src/vpn/gnunet-vpn.c b/src/vpn/gnunet-vpn.c
index d4acee49e..2e7daf7f7 100644
--- a/src/vpn/gnunet-vpn.c
+++ b/src/vpn/gnunet-vpn.c
@@ -163,7 +163,9 @@ allocation_cb (void *cls,
* @param cfg configuration
*/
static void
-run (void *cls, char *const *args, const char *cfgfile,
+run (void *cls,
+ char *const *args,
+ const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *cfg)
{
int dst_af;
@@ -177,8 +179,7 @@ run (void *cls, char *const *args, const char *cfgfile,
struct GNUNET_TIME_Absolute etime;
etime = GNUNET_TIME_relative_to_absolute (duration);
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
- &do_disconnect, NULL);
+ GNUNET_SCHEDULER_add_shutdown (&do_disconnect, NULL);
handle = GNUNET_VPN_connect (cfg);
if (NULL == handle)
goto error;