diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-02-15 15:37:07 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-02-15 15:37:07 +0100 |
commit | bc82b006f1ef798c5b4578026c6cbdb597985426 (patch) | |
tree | 65fba57ddb5c6d00f6bfd2fae3e4349748614479 /src/arm | |
parent | 731daf588fe49ffdf7b59816b840dc033b09a590 (diff) | |
download | gnunet-bc82b006f1ef798c5b4578026c6cbdb597985426.tar.gz gnunet-bc82b006f1ef798c5b4578026c6cbdb597985426.zip |
fix #4890
Diffstat (limited to 'src/arm')
-rw-r--r-- | src/arm/gnunet-arm.c | 35 |
1 files changed, 14 insertions, 21 deletions
diff --git a/src/arm/gnunet-arm.c b/src/arm/gnunet-arm.c index b6f4d99a8..65a6463cf 100644 --- a/src/arm/gnunet-arm.c +++ b/src/arm/gnunet-arm.c | |||
@@ -321,23 +321,21 @@ start_callback (void *cls, | |||
321 | enum GNUNET_ARM_RequestStatus rs, | 321 | enum GNUNET_ARM_RequestStatus rs, |
322 | enum GNUNET_ARM_Result result) | 322 | enum GNUNET_ARM_Result result) |
323 | { | 323 | { |
324 | char *msg; | ||
325 | |||
326 | op = NULL; | 324 | op = NULL; |
327 | if (GNUNET_ARM_REQUEST_SENT_OK != rs) | 325 | if (GNUNET_ARM_REQUEST_SENT_OK != rs) |
328 | { | 326 | { |
329 | GNUNET_asprintf (&msg, "%s", _("Failed to start the ARM service: %s\n")); | 327 | FPRINTF (stdout, |
330 | FPRINTF (stdout, msg, req_string (rs)); | 328 | _("Failed to start the ARM service: %s\n"), |
331 | GNUNET_free (msg); | 329 | req_string (rs)); |
332 | GNUNET_SCHEDULER_shutdown (); | 330 | GNUNET_SCHEDULER_shutdown (); |
333 | return; | 331 | return; |
334 | } | 332 | } |
335 | if ( (GNUNET_ARM_RESULT_STARTING != result) && | 333 | if ( (GNUNET_ARM_RESULT_STARTING != result) && |
336 | (GNUNET_ARM_RESULT_IS_STARTED_ALREADY != result) ) | 334 | (GNUNET_ARM_RESULT_IS_STARTED_ALREADY != result) ) |
337 | { | 335 | { |
338 | GNUNET_asprintf (&msg, "%s", _("Failed to start the ARM service: %s\n")); | 336 | FPRINTF (stdout, |
339 | FPRINTF (stdout, msg, ret_string (result)); | 337 | _("Failed to start the ARM service: %s\n"), |
340 | GNUNET_free (msg); | 338 | ret_string (result)); |
341 | GNUNET_SCHEDULER_shutdown (); | 339 | GNUNET_SCHEDULER_shutdown (); |
342 | return; | 340 | return; |
343 | } | 341 | } |
@@ -417,28 +415,23 @@ init_callback (void *cls, | |||
417 | enum GNUNET_ARM_RequestStatus rs, | 415 | enum GNUNET_ARM_RequestStatus rs, |
418 | enum GNUNET_ARM_Result result) | 416 | enum GNUNET_ARM_Result result) |
419 | { | 417 | { |
420 | char *msg; | ||
421 | |||
422 | op = NULL; | 418 | op = NULL; |
423 | if (GNUNET_ARM_REQUEST_SENT_OK != rs) | 419 | if (GNUNET_ARM_REQUEST_SENT_OK != rs) |
424 | { | 420 | { |
425 | GNUNET_asprintf (&msg, | 421 | FPRINTF (stdout, |
426 | _("Failed to send a request to start the `%s' service: %%s\n"), | 422 | _("Failed to send a request to start the `%s' service: %s\n"), |
427 | init); | 423 | init, |
428 | FPRINTF (stdout, msg, req_string (rs)); | 424 | req_string (rs)); |
429 | GNUNET_free (msg); | ||
430 | GNUNET_SCHEDULER_shutdown (); | 425 | GNUNET_SCHEDULER_shutdown (); |
431 | return; | 426 | return; |
432 | } | 427 | } |
433 | if ((GNUNET_ARM_RESULT_STARTING != result) && | 428 | if ((GNUNET_ARM_RESULT_STARTING != result) && |
434 | (GNUNET_ARM_RESULT_IS_STARTED_ALREADY != result)) | 429 | (GNUNET_ARM_RESULT_IS_STARTED_ALREADY != result)) |
435 | { | 430 | { |
436 | GNUNET_asprintf (&msg, | 431 | FPRINTF (stdout, |
437 | _("Failed to start the `%s' service: %s\n"), | 432 | _("Failed to start the `%s' service: %s\n"), |
438 | init, | 433 | init, |
439 | ret_string (result)); | 434 | ret_string (result)); |
440 | FPRINTF (stdout, "%s", msg); | ||
441 | GNUNET_free (msg); | ||
442 | GNUNET_SCHEDULER_shutdown (); | 435 | GNUNET_SCHEDULER_shutdown (); |
443 | return; | 436 | return; |
444 | } | 437 | } |