diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2013-03-26 10:07:33 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2013-03-26 10:07:33 +0000 |
commit | f22d1f58fde071d607853f50e9c0a7a2a3166e4e (patch) | |
tree | 169bd44a8ce6ce9163e922496b6331d08494de81 /src/arm/gnunet-arm.c | |
parent | da961ee2b22e226be17620b3cafee094189cce9e (diff) | |
download | gnunet-f22d1f58fde071d607853f50e9c0a7a2a3166e4e.tar.gz gnunet-f22d1f58fde071d607853f50e9c0a7a2a3166e4e.zip |
- style
Diffstat (limited to 'src/arm/gnunet-arm.c')
-rw-r--r-- | src/arm/gnunet-arm.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/arm/gnunet-arm.c b/src/arm/gnunet-arm.c index aae8b9eda..38e274d6e 100644 --- a/src/arm/gnunet-arm.c +++ b/src/arm/gnunet-arm.c | |||
@@ -339,29 +339,28 @@ start_callback (void *cls, struct GNUNET_ARM_Handle *arm, | |||
339 | enum GNUNET_ARM_RequestStatus rs, const char *service, | 339 | enum GNUNET_ARM_RequestStatus rs, const char *service, |
340 | enum GNUNET_ARM_Result result) | 340 | enum GNUNET_ARM_Result result) |
341 | { | 341 | { |
342 | char *msg; | ||
343 | |||
342 | if (GNUNET_ARM_REQUEST_SENT_OK != rs) | 344 | if (GNUNET_ARM_REQUEST_SENT_OK != rs) |
343 | { | 345 | { |
344 | char *msg; | ||
345 | GNUNET_asprintf (&msg, "%s", _("Failed to start the ARM service: %s\n")); | 346 | GNUNET_asprintf (&msg, "%s", _("Failed to start the ARM service: %s\n")); |
346 | FPRINTF (stdout, msg, req_string (rs)); | 347 | FPRINTF (stdout, msg, req_string (rs)); |
347 | GNUNET_free (msg); | 348 | GNUNET_free (msg); |
348 | GNUNET_SCHEDULER_shutdown (); | 349 | GNUNET_SCHEDULER_shutdown (); |
350 | return; | ||
349 | } | 351 | } |
350 | if ((GNUNET_ARM_RESULT_STARTING == result) || | 352 | if (! ((GNUNET_ARM_RESULT_STARTING == result) || |
351 | (GNUNET_ARM_RESULT_IS_STARTED_ALREADY == result)) | 353 | (GNUNET_ARM_RESULT_IS_STARTED_ALREADY == result)) ) |
352 | { | ||
353 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ARM service [re]start successful\n"); | ||
354 | start = 0; | ||
355 | GNUNET_SCHEDULER_add_now (action_loop, NULL); | ||
356 | } | ||
357 | else | ||
358 | { | 354 | { |
359 | char *msg; | ||
360 | GNUNET_asprintf (&msg, "%s", _("Failed to start the ARM service: %s\n")); | 355 | GNUNET_asprintf (&msg, "%s", _("Failed to start the ARM service: %s\n")); |
361 | FPRINTF (stdout, msg, ret_string (result)); | 356 | FPRINTF (stdout, msg, ret_string (result)); |
362 | GNUNET_free (msg); | 357 | GNUNET_free (msg); |
363 | GNUNET_SCHEDULER_shutdown (); | 358 | GNUNET_SCHEDULER_shutdown (); |
364 | } | 359 | } |
360 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ARM service [re]start successful\n"); | ||
361 | start = 0; | ||
362 | GNUNET_SCHEDULER_add_now (action_loop, NULL); | ||
363 | return; | ||
365 | } | 364 | } |
366 | 365 | ||
367 | 366 | ||
@@ -432,9 +431,9 @@ list_callback (void *cls, struct GNUNET_ARM_Handle *arm, | |||
432 | static void | 431 | static void |
433 | action_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 432 | action_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
434 | { | 433 | { |
435 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Running requested actions\n"); | ||
436 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 434 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
437 | return; | 435 | return; |
436 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Running requested actions\n"); | ||
438 | while (1) | 437 | while (1) |
439 | { | 438 | { |
440 | switch (phase++) | 439 | switch (phase++) |