aboutsummaryrefslogtreecommitdiff
path: root/src/vpn/gnunet-vpn.c
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/gnunet-vpn.c
parent7746f68db77b9ca3c4aaca24ab2ce5253461240b (diff)
downloadgnunet-95f9076a2139f5fb042b944a0658b6cda2fa35db.tar.gz
gnunet-95f9076a2139f5fb042b944a0658b6cda2fa35db.zip
implementing new scheduler shutdown semantics
Diffstat (limited to 'src/vpn/gnunet-vpn.c')
-rw-r--r--src/vpn/gnunet-vpn.c7
1 files changed, 4 insertions, 3 deletions
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,
163 * @param cfg configuration 163 * @param cfg configuration
164 */ 164 */
165static void 165static void
166run (void *cls, char *const *args, const char *cfgfile, 166run (void *cls,
167 char *const *args,
168 const char *cfgfile,
167 const struct GNUNET_CONFIGURATION_Handle *cfg) 169 const struct GNUNET_CONFIGURATION_Handle *cfg)
168{ 170{
169 int dst_af; 171 int dst_af;
@@ -177,8 +179,7 @@ run (void *cls, char *const *args, const char *cfgfile,
177 struct GNUNET_TIME_Absolute etime; 179 struct GNUNET_TIME_Absolute etime;
178 180
179 etime = GNUNET_TIME_relative_to_absolute (duration); 181 etime = GNUNET_TIME_relative_to_absolute (duration);
180 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, 182 GNUNET_SCHEDULER_add_shutdown (&do_disconnect, NULL);
181 &do_disconnect, NULL);
182 handle = GNUNET_VPN_connect (cfg); 183 handle = GNUNET_VPN_connect (cfg);
183 if (NULL == handle) 184 if (NULL == handle)
184 goto error; 185 goto error;