diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-04-30 08:17:37 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-04-30 08:17:37 +0000 |
commit | 95f9076a2139f5fb042b944a0658b6cda2fa35db (patch) | |
tree | b0826a2a1dcf812e6b4450fe6b05d47cd53ae49d /src/gns/test_gns_proxy.c | |
parent | 7746f68db77b9ca3c4aaca24ab2ce5253461240b (diff) | |
download | gnunet-95f9076a2139f5fb042b944a0658b6cda2fa35db.tar.gz gnunet-95f9076a2139f5fb042b944a0658b6cda2fa35db.zip |
implementing new scheduler shutdown semantics
Diffstat (limited to 'src/gns/test_gns_proxy.c')
-rw-r--r-- | src/gns/test_gns_proxy.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/gns/test_gns_proxy.c b/src/gns/test_gns_proxy.c index 0afc3ea0b..55ada84d7 100644 --- a/src/gns/test_gns_proxy.c +++ b/src/gns/test_gns_proxy.c | |||
@@ -245,6 +245,7 @@ curl_main () | |||
245 | NULL); | 245 | NULL); |
246 | } | 246 | } |
247 | 247 | ||
248 | |||
248 | static void | 249 | static void |
249 | start_curl (void *cls) | 250 | start_curl (void *cls) |
250 | { | 251 | { |
@@ -289,25 +290,27 @@ disco_ns (void* cls) | |||
289 | * specified target peer; NULL on error | 290 | * specified target peer; NULL on error |
290 | */ | 291 | */ |
291 | static void | 292 | static void |
292 | commence_testing (void *cls, int32_t success, const char *emsg) | 293 | commence_testing (void *cls, |
294 | int32_t success, | ||
295 | const char *emsg) | ||
293 | { | 296 | { |
294 | GNUNET_SCHEDULER_add_now (&disco_ns, NULL); | 297 | GNUNET_SCHEDULER_add_now (&disco_ns, NULL); |
295 | 298 | ||
296 | if ((emsg != NULL) && (GNUNET_YES != success)) | 299 | if ( (emsg != NULL) && (GNUNET_YES != success) ) |
297 | { | 300 | { |
298 | fprintf (stderr, | 301 | fprintf (stderr, |
299 | "NS failed to create record %s\n", emsg); | 302 | "NS failed to create record %s\n", |
303 | emsg); | ||
300 | GNUNET_SCHEDULER_shutdown (); | 304 | GNUNET_SCHEDULER_shutdown (); |
301 | return; | 305 | return; |
302 | } | 306 | } |
303 | 307 | ||
304 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1), start_curl, NULL); | 308 | curl_task_id = |
305 | 309 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, | |
310 | &start_curl, NULL); | ||
306 | } | 311 | } |
307 | 312 | ||
308 | 313 | ||
309 | |||
310 | |||
311 | /** | 314 | /** |
312 | * Function to keep the HTTP server running. | 315 | * Function to keep the HTTP server running. |
313 | */ | 316 | */ |