diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-06-13 11:32:15 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-06-13 11:32:15 +0000 |
commit | b59505fb59f630a07e2c8c950626628b41cb1d9c (patch) | |
tree | 6569bbd12dbd7022e73b4f323ed8b66fbe1fdbd2 | |
parent | cd761b2528fe515b8c9a82ac1e0348fa21eba5a4 (diff) | |
download | gnunet-gtk-b59505fb59f630a07e2c8c950626628b41cb1d9c.tar.gz gnunet-gtk-b59505fb59f630a07e2c8c950626628b41cb1d9c.zip |
-fix setup to use new API correctly
-rw-r--r-- | src/setup/gnunet-setup.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/setup/gnunet-setup.c b/src/setup/gnunet-setup.c index a4a83d18..e22155fd 100644 --- a/src/setup/gnunet-setup.c +++ b/src/setup/gnunet-setup.c | |||
@@ -429,16 +429,15 @@ GNUNET_SETUP_quit_cb (GObject * object, gpointer user_data) | |||
429 | * If the test failed, start the resolver process. | 429 | * If the test failed, start the resolver process. |
430 | * | 430 | * |
431 | * @param cls closure, NULL | 431 | * @param cls closure, NULL |
432 | * @param tc task context, reason is TIMEOUT if we need to | 432 | * @param result GNUNET_YES if the service is running |
433 | * start the process | ||
434 | */ | 433 | */ |
435 | static void | 434 | static void |
436 | start_resolver (void *cls, | 435 | start_resolver (void *cls, |
437 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 436 | int result) |
438 | { | 437 | { |
439 | char *binary; | 438 | char *binary; |
440 | 439 | ||
441 | if (0 == (tc->reason & GNUNET_SCHEDULER_REASON_TIMEOUT)) | 440 | if (GNUNET_YES == result) |
442 | return; | 441 | return; |
443 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-resolver"); | 442 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-resolver"); |
444 | resolver = | 443 | resolver = |
@@ -454,18 +453,15 @@ start_resolver (void *cls, | |||
454 | * If the test failed, start the namestore process. | 453 | * If the test failed, start the namestore process. |
455 | * | 454 | * |
456 | * @param cls closure, NULL | 455 | * @param cls closure, NULL |
457 | * @param tc task context, reason is TIMEOUT if we need to | 456 | * @param result GNUNET_YES if the service is running |
458 | * start the process | ||
459 | */ | 457 | */ |
460 | static void | 458 | static void |
461 | start_namestore (void *cls, | 459 | start_namestore (void *cls, |
462 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 460 | int result) |
463 | { | 461 | { |
464 | char *binary; | 462 | char *binary; |
465 | 463 | ||
466 | if (0 == (tc->reason & GNUNET_SCHEDULER_REASON_TIMEOUT)) | 464 | if (GNUNET_YES == result) |
467 | return; | ||
468 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | ||
469 | return; | 465 | return; |
470 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-namestore"); | 466 | binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-namestore"); |
471 | namestore = | 467 | namestore = |