diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-05-28 09:58:58 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-05-28 09:58:58 +0000 |
commit | fc1b9d4caffabba3411a27f62f9ea309a2cf8edc (patch) | |
tree | 1531a48624abbf478a27a1780e243c1059a7a938 | |
parent | b1294ac8f7a3cf9d53334485b7ff2d97d3fb4ab7 (diff) | |
download | gnunet-fc1b9d4caffabba3411a27f62f9ea309a2cf8edc.tar.gz gnunet-fc1b9d4caffabba3411a27f62f9ea309a2cf8edc.zip |
-fix ftbfs
-rw-r--r-- | src/ats-tool/gnunet-ats.c | 10 | ||||
-rw-r--r-- | src/util/configuration_loader.c | 10 | ||||
-rw-r--r-- | src/util/crypto_ecc_setup.c | 13 | ||||
-rw-r--r-- | src/util/crypto_hash.c | 2 | ||||
-rw-r--r-- | src/util/crypto_hash_file.c | 8 | ||||
-rw-r--r-- | src/util/disk.c | 4 | ||||
-rw-r--r-- | src/util/disk_iterator.c | 9 |
7 files changed, 44 insertions, 12 deletions
diff --git a/src/ats-tool/gnunet-ats.c b/src/ats-tool/gnunet-ats.c index 2d19df737..46244d4b0 100644 --- a/src/ats-tool/gnunet-ats.c +++ b/src/ats-tool/gnunet-ats.c | |||
@@ -285,11 +285,11 @@ end (void *cls, | |||
285 | addresses = NULL; | 285 | addresses = NULL; |
286 | 286 | ||
287 | if (0 < pending) | 287 | if (0 < pending) |
288 | FPRINTF (stderr, | 288 | FPRINTF (stdout, |
289 | _("%u address resolutions had a timeout\n"), | 289 | _("%u address resolutions had a timeout\n"), |
290 | pending); | 290 | pending); |
291 | if (opt_list_used || opt_list_all) | 291 | if (opt_list_used || opt_list_all) |
292 | FPRINTF (stderr, | 292 | FPRINTF (stdout, |
293 | _("ATS returned stat_results for %u addresses\n"), | 293 | _("ATS returned stat_results for %u addresses\n"), |
294 | stat_results); | 294 | stat_results); |
295 | ret = 0; | 295 | ret = 0; |
@@ -362,7 +362,7 @@ transport_addr_to_str_cb (void *cls, | |||
362 | return; | 362 | return; |
363 | } | 363 | } |
364 | 364 | ||
365 | FPRINTF (stderr, | 365 | FPRINTF (stdout, |
366 | _("Peer `%s' plugin `%s', address `%s', `%s' bw out: %u Bytes/s, bw in %u Bytes/s, %s\n"), | 366 | _("Peer `%s' plugin `%s', address `%s', `%s' bw out: %u Bytes/s, bw in %u Bytes/s, %s\n"), |
367 | GNUNET_i2s (&pr->address->peer), | 367 | GNUNET_i2s (&pr->address->peer), |
368 | pr->address->transport_name, | 368 | pr->address->transport_name, |
@@ -479,7 +479,7 @@ ats_perf_mon_cb (void *cls, | |||
479 | GNUNET_CONTAINER_multipeermap_remove (addresses, | 479 | GNUNET_CONTAINER_multipeermap_remove (addresses, |
480 | &address->peer, | 480 | &address->peer, |
481 | actx.res)); | 481 | actx.res)); |
482 | FPRINTF (stderr, | 482 | FPRINTF (stdout, |
483 | _("Removed address of peer `%s' with plugin `%s'\n"), | 483 | _("Removed address of peer `%s' with plugin `%s'\n"), |
484 | GNUNET_i2s (&address->peer), | 484 | GNUNET_i2s (&address->peer), |
485 | actx.res->address->transport_name); | 485 | actx.res->address->transport_name); |
@@ -672,7 +672,7 @@ print_quotas (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
672 | } | 672 | } |
673 | GNUNET_free(entry_in); | 673 | GNUNET_free(entry_in); |
674 | 674 | ||
675 | FPRINTF (stderr, | 675 | FPRINTF (stdout, |
676 | _("Quota for network `%11s' (in/out): %10s / %10s\n"), | 676 | _("Quota for network `%11s' (in/out): %10s / %10s\n"), |
677 | GNUNET_ATS_print_network_type (c), | 677 | GNUNET_ATS_print_network_type (c), |
678 | quota_in_str, | 678 | quota_in_str, |
diff --git a/src/util/configuration_loader.c b/src/util/configuration_loader.c index 0b7f2865d..c0546a211 100644 --- a/src/util/configuration_loader.c +++ b/src/util/configuration_loader.c | |||
@@ -24,6 +24,12 @@ | |||
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include "platform.h" | ||
28 | #include "gnunet_util_lib.h" | ||
29 | |||
30 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | ||
31 | |||
32 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util", syscall, filename) | ||
27 | /** | 33 | /** |
28 | * Load configuration (starts with defaults, then loads | 34 | * Load configuration (starts with defaults, then loads |
29 | * system-specific configuration). | 35 | * system-specific configuration). |
@@ -45,8 +51,10 @@ GNUNET_CONFIGURATION_load (struct GNUNET_CONFIGURATION_Handle *cfg, | |||
45 | baseconfig = NULL; | 51 | baseconfig = NULL; |
46 | GNUNET_asprintf (&baseconfig, "%s%s", ipath, "config.d"); | 52 | GNUNET_asprintf (&baseconfig, "%s%s", ipath, "config.d"); |
47 | GNUNET_free (ipath); | 53 | GNUNET_free (ipath); |
54 | |||
48 | if (GNUNET_SYSERR == | 55 | if (GNUNET_SYSERR == |
49 | GNUNET_DISK_directory_scan (baseconfig, &parse_configuration_file, cfg)) | 56 | GNUNET_CONFIGURATION_load_from (cfg, |
57 | baseconfig)) | ||
50 | { | 58 | { |
51 | GNUNET_free (baseconfig); | 59 | GNUNET_free (baseconfig); |
52 | return GNUNET_SYSERR; /* no configuration at all found */ | 60 | return GNUNET_SYSERR; /* no configuration at all found */ |
diff --git a/src/util/crypto_ecc_setup.c b/src/util/crypto_ecc_setup.c index 32e1acee3..67f1dea24 100644 --- a/src/util/crypto_ecc_setup.c +++ b/src/util/crypto_ecc_setup.c | |||
@@ -27,6 +27,19 @@ | |||
27 | #include <gcrypt.h> | 27 | #include <gcrypt.h> |
28 | #include "gnunet_util_lib.h" | 28 | #include "gnunet_util_lib.h" |
29 | 29 | ||
30 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | ||
31 | |||
32 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util", syscall) | ||
33 | |||
34 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util", syscall, filename) | ||
35 | |||
36 | /** | ||
37 | * Log an error message at log-level 'level' that indicates | ||
38 | * a failure of the command 'cmd' with the message given | ||
39 | * by gcry_strerror(rc). | ||
40 | */ | ||
41 | #define LOG_GCRY(level, cmd, rc) do { LOG(level, _("`%s' failed at %s:%d with error: %s\n"), cmd, __FILE__, __LINE__, gcry_strerror(rc)); } while(0) | ||
42 | |||
30 | 43 | ||
31 | /** | 44 | /** |
32 | * Wait for a short time (we're trying to lock a file or want | 45 | * Wait for a short time (we're trying to lock a file or want |
diff --git a/src/util/crypto_hash.c b/src/util/crypto_hash.c index 9456e343b..e9f25bf84 100644 --- a/src/util/crypto_hash.c +++ b/src/util/crypto_hash.c | |||
@@ -18,13 +18,11 @@ | |||
18 | Boston, MA 02111-1307, USA. | 18 | Boston, MA 02111-1307, USA. |
19 | 19 | ||
20 | */ | 20 | */ |
21 | |||
22 | /** | 21 | /** |
23 | * @file util/crypto_hash.c | 22 | * @file util/crypto_hash.c |
24 | * @brief SHA-512 #GNUNET_CRYPTO_hash() related functions | 23 | * @brief SHA-512 #GNUNET_CRYPTO_hash() related functions |
25 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
26 | */ | 25 | */ |
27 | |||
28 | #include "platform.h" | 26 | #include "platform.h" |
29 | #include "gnunet_util_lib.h" | 27 | #include "gnunet_util_lib.h" |
30 | #include <gcrypt.h> | 28 | #include <gcrypt.h> |
diff --git a/src/util/crypto_hash_file.c b/src/util/crypto_hash_file.c index 2d15fac36..f2b53008e 100644 --- a/src/util/crypto_hash_file.c +++ b/src/util/crypto_hash_file.c | |||
@@ -18,12 +18,18 @@ | |||
18 | Boston, MA 02111-1307, USA. | 18 | Boston, MA 02111-1307, USA. |
19 | 19 | ||
20 | */ | 20 | */ |
21 | |||
22 | /** | 21 | /** |
23 | * @file util/crypto_hash_file.c | 22 | * @file util/crypto_hash_file.c |
24 | * @brief incremental hashing of files | 23 | * @brief incremental hashing of files |
25 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
26 | */ | 25 | */ |
26 | #include "platform.h" | ||
27 | #include "gnunet_util_lib.h" | ||
28 | #include <gcrypt.h> | ||
29 | |||
30 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | ||
31 | |||
32 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util", syscall, filename) | ||
27 | 33 | ||
28 | 34 | ||
29 | /** | 35 | /** |
diff --git a/src/util/disk.c b/src/util/disk.c index 81413265e..a56966d04 100644 --- a/src/util/disk.c +++ b/src/util/disk.c | |||
@@ -17,14 +17,12 @@ | |||
17 | Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 | Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
18 | Boston, MA 02111-1307, USA. | 18 | Boston, MA 02111-1307, USA. |
19 | */ | 19 | */ |
20 | |||
21 | /** | 20 | /** |
22 | * @file util/disk.c | 21 | * @file util/disk.c |
23 | * @brief disk IO convenience methods | 22 | * @brief disk IO convenience methods |
24 | * @author Christian Grothoff | 23 | * @author Christian Grothoff |
25 | * @author Nils Durner | 24 | * @author Nils Durner |
26 | */ | 25 | */ |
27 | |||
28 | #include "platform.h" | 26 | #include "platform.h" |
29 | #include "gnunet_util_lib.h" | 27 | #include "gnunet_util_lib.h" |
30 | #include "disk.h" | 28 | #include "disk.h" |
@@ -609,7 +607,7 @@ GNUNET_DISK_mktemp (const char *t) | |||
609 | * with the same name). | 607 | * with the same name). |
610 | * | 608 | * |
611 | * @param fil filename to test | 609 | * @param fil filename to test |
612 | * @param is_readable GNUNET_YES to additionally check if @a fil is readable; | 610 | * @param is_readable #GNUNET_YES to additionally check if @a fil is readable; |
613 | * #GNUNET_NO to disable this check | 611 | * #GNUNET_NO to disable this check |
614 | * @return #GNUNET_YES if yes, #GNUNET_NO if not; #GNUNET_SYSERR if it | 612 | * @return #GNUNET_YES if yes, #GNUNET_NO if not; #GNUNET_SYSERR if it |
615 | * does not exist or stat'ed | 613 | * does not exist or stat'ed |
diff --git a/src/util/disk_iterator.c b/src/util/disk_iterator.c index 118823df6..99cd1e9de 100644 --- a/src/util/disk_iterator.c +++ b/src/util/disk_iterator.c | |||
@@ -23,6 +23,15 @@ | |||
23 | * @author Christian Grothoff | 23 | * @author Christian Grothoff |
24 | * @author Nils Durner | 24 | * @author Nils Durner |
25 | */ | 25 | */ |
26 | #include "platform.h" | ||
27 | #include "gnunet_util_lib.h" | ||
28 | #include "disk.h" | ||
29 | |||
30 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | ||
31 | |||
32 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util", syscall) | ||
33 | |||
34 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util", syscall, filename) | ||
26 | 35 | ||
27 | 36 | ||
28 | /** | 37 | /** |