diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-05-10 13:37:02 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-05-10 13:37:02 +0200 |
commit | 5351d6b088a895b5c21577ec540f139f2d6d2467 (patch) | |
tree | e1491f3ed6eb49d3acd555952b14517b4322db33 /src/transport/test_plugin_transport.c | |
parent | fa126996254a79c1140683ab32498ff07840b99e (diff) | |
download | gnunet-5351d6b088a895b5c21577ec540f139f2d6d2467.tar.gz gnunet-5351d6b088a895b5c21577ec540f139f2d6d2467.zip |
more verbose logging
Diffstat (limited to 'src/transport/test_plugin_transport.c')
-rw-r--r-- | src/transport/test_plugin_transport.c | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/src/transport/test_plugin_transport.c b/src/transport/test_plugin_transport.c index acb3911f0..d80a13410 100644 --- a/src/transport/test_plugin_transport.c +++ b/src/transport/test_plugin_transport.c | |||
@@ -566,8 +566,10 @@ handle_helper_message (void *cls, | |||
566 | * @param c configuration to use | 566 | * @param c configuration to use |
567 | */ | 567 | */ |
568 | static void | 568 | static void |
569 | run (void *cls, char * const *args, const char *cfgfile, | 569 | run (void *cls, |
570 | const struct GNUNET_CONFIGURATION_Handle *c) | 570 | char * const *args, |
571 | const char *cfgfile, | ||
572 | const struct GNUNET_CONFIGURATION_Handle *c) | ||
571 | { | 573 | { |
572 | char * const *argv = cls; | 574 | char * const *argv = cls; |
573 | unsigned long long tneigh; | 575 | unsigned long long tneigh; |
@@ -575,8 +577,9 @@ run (void *cls, char * const *args, const char *cfgfile, | |||
575 | char *plugin; | 577 | char *plugin; |
576 | char *sep; | 578 | char *sep; |
577 | 579 | ||
578 | timeout_endbadly = GNUNET_SCHEDULER_add_delayed (TIMEOUT, end_badly, &ok); | 580 | timeout_endbadly = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
579 | 581 | &end_badly, | |
582 | &ok); | ||
580 | cfg = c; | 583 | cfg = c; |
581 | /* parse configuration */ | 584 | /* parse configuration */ |
582 | if ((GNUNET_OK | 585 | if ((GNUNET_OK |
@@ -594,7 +597,7 @@ run (void *cls, char * const *args, const char *cfgfile, | |||
594 | if (NULL == (stats = GNUNET_STATISTICS_create ("transport", cfg))) | 597 | if (NULL == (stats = GNUNET_STATISTICS_create ("transport", cfg))) |
595 | { | 598 | { |
596 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, | 599 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, |
597 | "Could not create statistics. Exiting.\n"); | 600 | "Could not create statistics. Exiting.\n"); |
598 | GNUNET_free(keyfile); | 601 | GNUNET_free(keyfile); |
599 | end_badly_now (); | 602 | end_badly_now (); |
600 | return; | 603 | return; |
@@ -602,27 +605,33 @@ run (void *cls, char * const *args, const char *cfgfile, | |||
602 | 605 | ||
603 | if (GNUNET_OK != GNUNET_DISK_file_test (HOSTKEY_FILE)) | 606 | if (GNUNET_OK != GNUNET_DISK_file_test (HOSTKEY_FILE)) |
604 | { | 607 | { |
605 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Hostkey `%s' missing. Exiting.\n", | 608 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, |
606 | HOSTKEY_FILE); | 609 | "Hostkey `%s' missing. Exiting.\n", |
610 | HOSTKEY_FILE); | ||
607 | GNUNET_free(keyfile); | 611 | GNUNET_free(keyfile); |
608 | end_badly_now (); | 612 | end_badly_now (); |
609 | return; | 613 | return; |
610 | } | 614 | } |
611 | 615 | ||
612 | if (GNUNET_OK != GNUNET_DISK_directory_create_for_file (keyfile)) | 616 | if (GNUNET_OK != |
617 | GNUNET_DISK_directory_create_for_file (keyfile)) | ||
613 | { | 618 | { |
614 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, | 619 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, |
615 | "Could not create a directory for hostkey `%s'. Exiting.\n", keyfile); | 620 | "Could not create a directory for hostkey `%s'. Exiting.\n", |
621 | keyfile); | ||
616 | GNUNET_free(keyfile); | 622 | GNUNET_free(keyfile); |
617 | end_badly_now (); | 623 | end_badly_now (); |
618 | return; | 624 | return; |
619 | } | 625 | } |
620 | 626 | ||
621 | if (GNUNET_OK != GNUNET_DISK_file_copy (HOSTKEY_FILE, keyfile)) | 627 | if (GNUNET_OK != |
628 | GNUNET_DISK_file_copy (HOSTKEY_FILE, | ||
629 | keyfile)) | ||
622 | { | 630 | { |
623 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, | 631 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, |
624 | "Could not copy hostkey `%s' to destination `%s'. Exiting.\n", | 632 | "Could not copy hostkey `%s' to destination `%s'. Exiting.\n", |
625 | HOSTKEY_FILE, keyfile); | 633 | HOSTKEY_FILE, |
634 | keyfile); | ||
626 | GNUNET_free(keyfile); | 635 | GNUNET_free(keyfile); |
627 | end_badly_now (); | 636 | end_badly_now (); |
628 | return; | 637 | return; |