diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-10-06 20:55:28 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-10-06 20:55:28 +0000 |
commit | 61c39c60565b386e0e12ea669556b030e8cd7180 (patch) | |
tree | 59109aeab8297bdc996faca8c4e38ec7426c36cf /src/arm/gnunet-arm.c | |
parent | 780eb09dd8040ecf8649d40ddf8314464e0fc48e (diff) | |
download | gnunet-61c39c60565b386e0e12ea669556b030e8cd7180.tar.gz gnunet-61c39c60565b386e0e12ea669556b030e8cd7180.zip |
-remove trailing whitespace
Diffstat (limited to 'src/arm/gnunet-arm.c')
-rw-r--r-- | src/arm/gnunet-arm.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/arm/gnunet-arm.c b/src/arm/gnunet-arm.c index 85cb1f45d..80d3e9c03 100644 --- a/src/arm/gnunet-arm.c +++ b/src/arm/gnunet-arm.c | |||
@@ -167,7 +167,7 @@ delete_files () | |||
167 | { | 167 | { |
168 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 168 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
169 | _("Failed to remove servicehome directory %s\n"), dir); | 169 | _("Failed to remove servicehome directory %s\n"), dir); |
170 | 170 | ||
171 | } | 171 | } |
172 | } | 172 | } |
173 | 173 | ||
@@ -269,7 +269,7 @@ ret_string (enum GNUNET_ARM_Result result) | |||
269 | * @param cls closure | 269 | * @param cls closure |
270 | * @param tc scheudler context | 270 | * @param tc scheudler context |
271 | */ | 271 | */ |
272 | static void | 272 | static void |
273 | action_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | 273 | action_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); |
274 | 274 | ||
275 | 275 | ||
@@ -283,11 +283,11 @@ action_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | |||
283 | * GNUNET_SYSERR on error. | 283 | * GNUNET_SYSERR on error. |
284 | */ | 284 | */ |
285 | static void | 285 | static void |
286 | conn_status (void *cls, | 286 | conn_status (void *cls, |
287 | int connected) | 287 | int connected) |
288 | { | 288 | { |
289 | static int once; | 289 | static int once; |
290 | 290 | ||
291 | if ( (GNUNET_SYSERR == connected) && | 291 | if ( (GNUNET_SYSERR == connected) && |
292 | (0 == once) ) | 292 | (0 == once) ) |
293 | { | 293 | { |
@@ -335,7 +335,7 @@ start_callback (void *cls, | |||
335 | GNUNET_free (msg); | 335 | GNUNET_free (msg); |
336 | GNUNET_SCHEDULER_shutdown (); | 336 | GNUNET_SCHEDULER_shutdown (); |
337 | return; | 337 | return; |
338 | } | 338 | } |
339 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ARM service [re]start successful\n"); | 339 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ARM service [re]start successful\n"); |
340 | start = 0; | 340 | start = 0; |
341 | GNUNET_SCHEDULER_add_now (action_loop, NULL); | 341 | GNUNET_SCHEDULER_add_now (action_loop, NULL); |
@@ -355,7 +355,7 @@ start_callback (void *cls, | |||
355 | * according to ARM | 355 | * according to ARM |
356 | */ | 356 | */ |
357 | static void | 357 | static void |
358 | stop_callback (void *cls, | 358 | stop_callback (void *cls, |
359 | enum GNUNET_ARM_RequestStatus rs, const char *service, | 359 | enum GNUNET_ARM_RequestStatus rs, const char *service, |
360 | enum GNUNET_ARM_Result result) | 360 | enum GNUNET_ARM_Result result) |
361 | { | 361 | { |
@@ -363,7 +363,7 @@ stop_callback (void *cls, | |||
363 | 363 | ||
364 | if (GNUNET_ARM_REQUEST_SENT_OK != rs) | 364 | if (GNUNET_ARM_REQUEST_SENT_OK != rs) |
365 | { | 365 | { |
366 | GNUNET_asprintf (&msg, "%s", | 366 | GNUNET_asprintf (&msg, "%s", |
367 | _("Failed to send a stop request to the ARM service: %s\n")); | 367 | _("Failed to send a stop request to the ARM service: %s\n")); |
368 | FPRINTF (stdout, msg, req_string (rs)); | 368 | FPRINTF (stdout, msg, req_string (rs)); |
369 | GNUNET_free (msg); | 369 | GNUNET_free (msg); |
@@ -380,14 +380,14 @@ stop_callback (void *cls, | |||
380 | GNUNET_SCHEDULER_shutdown (); | 380 | GNUNET_SCHEDULER_shutdown (); |
381 | return; | 381 | return; |
382 | } | 382 | } |
383 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 383 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
384 | "ARM service shutdown successful\n"); | 384 | "ARM service shutdown successful\n"); |
385 | end = 0; | 385 | end = 0; |
386 | if (restart) | 386 | if (restart) |
387 | { | 387 | { |
388 | restart = 0; | 388 | restart = 0; |
389 | start = 1; | 389 | start = 1; |
390 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 390 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
391 | "Initiating an ARM restart\n"); | 391 | "Initiating an ARM restart\n"); |
392 | } | 392 | } |
393 | GNUNET_SCHEDULER_add_now (&action_loop, NULL); | 393 | GNUNET_SCHEDULER_add_now (&action_loop, NULL); |
@@ -407,12 +407,12 @@ stop_callback (void *cls, | |||
407 | * according to ARM | 407 | * according to ARM |
408 | */ | 408 | */ |
409 | static void | 409 | static void |
410 | init_callback (void *cls, | 410 | init_callback (void *cls, |
411 | enum GNUNET_ARM_RequestStatus rs, const char *service, | 411 | enum GNUNET_ARM_RequestStatus rs, const char *service, |
412 | enum GNUNET_ARM_Result result) | 412 | enum GNUNET_ARM_Result result) |
413 | { | 413 | { |
414 | char *msg; | 414 | char *msg; |
415 | 415 | ||
416 | if (GNUNET_ARM_REQUEST_SENT_OK != rs) | 416 | if (GNUNET_ARM_REQUEST_SENT_OK != rs) |
417 | { | 417 | { |
418 | GNUNET_asprintf (&msg, _("Failed to send a request to start the `%s' service: %%s\n"), init); | 418 | GNUNET_asprintf (&msg, _("Failed to send a request to start the `%s' service: %%s\n"), init); |
@@ -431,8 +431,8 @@ init_callback (void *cls, | |||
431 | GNUNET_SCHEDULER_shutdown (); | 431 | GNUNET_SCHEDULER_shutdown (); |
432 | return; | 432 | return; |
433 | } | 433 | } |
434 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 434 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
435 | "Service %s [re]started successfully\n", | 435 | "Service %s [re]started successfully\n", |
436 | init); | 436 | init); |
437 | init = NULL; | 437 | init = NULL; |
438 | GNUNET_SCHEDULER_add_now (&action_loop, NULL); | 438 | GNUNET_SCHEDULER_add_now (&action_loop, NULL); |
@@ -452,7 +452,7 @@ init_callback (void *cls, | |||
452 | * according to ARM | 452 | * according to ARM |
453 | */ | 453 | */ |
454 | static void | 454 | static void |
455 | term_callback (void *cls, | 455 | term_callback (void *cls, |
456 | enum GNUNET_ARM_RequestStatus rs, const char *service, | 456 | enum GNUNET_ARM_RequestStatus rs, const char *service, |
457 | enum GNUNET_ARM_Result result) | 457 | enum GNUNET_ARM_Result result) |
458 | { | 458 | { |
@@ -470,7 +470,7 @@ term_callback (void *cls, | |||
470 | if ((GNUNET_ARM_RESULT_STOPPED != result) && | 470 | if ((GNUNET_ARM_RESULT_STOPPED != result) && |
471 | (GNUNET_ARM_RESULT_IS_STOPPED_ALREADY != result)) | 471 | (GNUNET_ARM_RESULT_IS_STOPPED_ALREADY != result)) |
472 | { | 472 | { |
473 | GNUNET_asprintf (&msg, | 473 | GNUNET_asprintf (&msg, |
474 | _("Failed to kill the `%s' service: %s\n"), | 474 | _("Failed to kill the `%s' service: %s\n"), |
475 | term, ret_string (result)); | 475 | term, ret_string (result)); |
476 | FPRINTF (stdout, msg, service); | 476 | FPRINTF (stdout, msg, service); |
@@ -479,7 +479,7 @@ term_callback (void *cls, | |||
479 | return; | 479 | return; |
480 | } | 480 | } |
481 | 481 | ||
482 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 482 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
483 | "Service %s stopped successfully\n", term); | 483 | "Service %s stopped successfully\n", term); |
484 | term = NULL; | 484 | term = NULL; |
485 | GNUNET_SCHEDULER_add_now (&action_loop, NULL); | 485 | GNUNET_SCHEDULER_add_now (&action_loop, NULL); |
@@ -497,7 +497,7 @@ term_callback (void *cls, | |||
497 | * @param list list of services that are running | 497 | * @param list list of services that are running |
498 | */ | 498 | */ |
499 | static void | 499 | static void |
500 | list_callback (void *cls, | 500 | list_callback (void *cls, |
501 | enum GNUNET_ARM_RequestStatus rs, unsigned int count, | 501 | enum GNUNET_ARM_RequestStatus rs, unsigned int count, |
502 | const char *const*list) | 502 | const char *const*list) |
503 | { | 503 | { |
@@ -546,7 +546,7 @@ action_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
546 | if (NULL != term) | 546 | if (NULL != term) |
547 | { | 547 | { |
548 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Termination action\n"); | 548 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Termination action\n"); |
549 | GNUNET_ARM_request_service_stop (h, term, | 549 | GNUNET_ARM_request_service_stop (h, term, |
550 | (0 == timeout.rel_value_us) ? STOP_TIMEOUT : timeout, | 550 | (0 == timeout.rel_value_us) ? STOP_TIMEOUT : timeout, |
551 | &term_callback, NULL); | 551 | &term_callback, NULL); |
552 | return; | 552 | return; |
@@ -556,7 +556,7 @@ action_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
556 | if (end || restart) | 556 | if (end || restart) |
557 | { | 557 | { |
558 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "End action\n"); | 558 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "End action\n"); |
559 | GNUNET_ARM_request_service_stop (h, "arm", | 559 | GNUNET_ARM_request_service_stop (h, "arm", |
560 | (0 == timeout.rel_value_us) ? STOP_TIMEOUT_ARM : timeout, | 560 | (0 == timeout.rel_value_us) ? STOP_TIMEOUT_ARM : timeout, |
561 | &stop_callback, NULL); | 561 | &stop_callback, NULL); |
562 | return; | 562 | return; |
@@ -585,7 +585,7 @@ action_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
585 | } | 585 | } |
586 | break; | 586 | break; |
587 | case 4: | 587 | case 4: |
588 | if (list) | 588 | if (list) |
589 | { | 589 | { |
590 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 590 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
591 | "Going to list all running services controlled by ARM.\n"); | 591 | "Going to list all running services controlled by ARM.\n"); |
@@ -593,10 +593,10 @@ action_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
593 | (0 == timeout.rel_value_us) ? LIST_TIMEOUT : timeout, | 593 | (0 == timeout.rel_value_us) ? LIST_TIMEOUT : timeout, |
594 | &list_callback, &list); | 594 | &list_callback, &list); |
595 | return; | 595 | return; |
596 | } | 596 | } |
597 | break; | 597 | break; |
598 | case 5: | 598 | case 5: |
599 | if (monitor) | 599 | if (monitor) |
600 | { | 600 | { |
601 | if (! quiet) | 601 | if (! quiet) |
602 | fprintf (stderr, | 602 | fprintf (stderr, |
@@ -621,7 +621,7 @@ action_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
621 | * @param status status of the service | 621 | * @param status status of the service |
622 | */ | 622 | */ |
623 | static void | 623 | static void |
624 | srv_status (void *cls, | 624 | srv_status (void *cls, |
625 | const char *service, enum GNUNET_ARM_ServiceStatus status) | 625 | const char *service, enum GNUNET_ARM_ServiceStatus status) |
626 | { | 626 | { |
627 | const char *msg; | 627 | const char *msg; |
@@ -663,8 +663,8 @@ srv_status (void *cls, | |||
663 | * @param c configuration | 663 | * @param c configuration |
664 | */ | 664 | */ |
665 | static void | 665 | static void |
666 | run (void *cls, | 666 | run (void *cls, |
667 | char *const *args, | 667 | char *const *args, |
668 | const char *cfgfile, | 668 | const char *cfgfile, |
669 | const struct GNUNET_CONFIGURATION_Handle *c) | 669 | const struct GNUNET_CONFIGURATION_Handle *c) |
670 | { | 670 | { |
@@ -672,7 +672,7 @@ run (void *cls, | |||
672 | 672 | ||
673 | cfg = GNUNET_CONFIGURATION_dup (c); | 673 | cfg = GNUNET_CONFIGURATION_dup (c); |
674 | config_file = cfgfile; | 674 | config_file = cfgfile; |
675 | if (GNUNET_OK != | 675 | if (GNUNET_OK != |
676 | GNUNET_CONFIGURATION_get_value_string (cfg, "PATHS", "SERVICEHOME", &dir)) | 676 | GNUNET_CONFIGURATION_get_value_string (cfg, "PATHS", "SERVICEHOME", &dir)) |
677 | { | 677 | { |
678 | GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, | 678 | GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, |