aboutsummaryrefslogtreecommitdiff
path: root/src/gns/test_gns_proxy.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/gns/test_gns_proxy.c
parent7746f68db77b9ca3c4aaca24ab2ce5253461240b (diff)
downloadgnunet-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.c17
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
248static void 249static void
249start_curl (void *cls) 250start_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 */
291static void 292static void
292commence_testing (void *cls, int32_t success, const char *emsg) 293commence_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 */