diff options
author | tg(x) <*@tg-x.net> | 2017-02-24 20:10:42 +0100 |
---|---|---|
committer | tg(x) <*@tg-x.net> | 2017-02-24 20:10:42 +0100 |
commit | cb1165ecfc5c89c22aa4a6fffb72e27e0bde43a3 (patch) | |
tree | 401701a61ae8245f212364df7b44b228a9f4c225 /src | |
parent | 435ef0a62ffe830ccee159f430157cfc8cc6a3d4 (diff) | |
download | gnunet-cb1165ecfc5c89c22aa4a6fffb72e27e0bde43a3.tar.gz gnunet-cb1165ecfc5c89c22aa4a6fffb72e27e0bde43a3.zip |
util: add component name to LOG macros; util/client: log incoming message type/size/source for gnunet-logread
Diffstat (limited to 'src')
49 files changed, 127 insertions, 114 deletions
diff --git a/src/util/bio.c b/src/util/bio.c index 62f4904f7..08e30dc01 100644 --- a/src/util/bio.c +++ b/src/util/bio.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include "platform.h" | 25 | #include "platform.h" |
26 | #include "gnunet_util_lib.h" | 26 | #include "gnunet_util_lib.h" |
27 | 27 | ||
28 | #define LOG(kind,...) GNUNET_log_from (kind, "util",__VA_ARGS__) | 28 | #define LOG(kind,...) GNUNET_log_from (kind, "util-bio",__VA_ARGS__) |
29 | 29 | ||
30 | #ifndef PATH_MAX | 30 | #ifndef PATH_MAX |
31 | /** | 31 | /** |
diff --git a/src/util/client.c b/src/util/client.c index a5e04d7b2..0f7d0d359 100644 --- a/src/util/client.c +++ b/src/util/client.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include "gnunet_socks.h" | 33 | #include "gnunet_socks.h" |
34 | 34 | ||
35 | 35 | ||
36 | #define LOG(kind,...) GNUNET_log_from (kind, "util",__VA_ARGS__) | 36 | #define LOG(kind,...) GNUNET_log_from (kind, "util-client",__VA_ARGS__) |
37 | 37 | ||
38 | 38 | ||
39 | /** | 39 | /** |
@@ -298,6 +298,11 @@ recv_message (void *cls, | |||
298 | 298 | ||
299 | if (GNUNET_YES == cstate->in_destroy) | 299 | if (GNUNET_YES == cstate->in_destroy) |
300 | return GNUNET_SYSERR; | 300 | return GNUNET_SYSERR; |
301 | |||
302 | LOG (GNUNET_ERROR_TYPE_INFO, | ||
303 | "Received message of type %u and size %u from %s\n", | ||
304 | ntohs (msg->type), ntohs (msg->size), cstate->service_name); | ||
305 | |||
301 | GNUNET_MQ_inject_message (cstate->mq, | 306 | GNUNET_MQ_inject_message (cstate->mq, |
302 | msg); | 307 | msg); |
303 | if (GNUNET_YES == cstate->in_destroy) | 308 | if (GNUNET_YES == cstate->in_destroy) |
diff --git a/src/util/common_allocation.c b/src/util/common_allocation.c index 71a2221ee..737584815 100644 --- a/src/util/common_allocation.c +++ b/src/util/common_allocation.c | |||
@@ -32,9 +32,9 @@ | |||
32 | #include <malloc/malloc.h> | 32 | #include <malloc/malloc.h> |
33 | #endif | 33 | #endif |
34 | 34 | ||
35 | #define LOG(kind,...) GNUNET_log_from (kind, "util",__VA_ARGS__) | 35 | #define LOG(kind,...) GNUNET_log_from (kind, "util-common-allocation",__VA_ARGS__) |
36 | 36 | ||
37 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util", syscall) | 37 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util-common-allocation", syscall) |
38 | 38 | ||
39 | #ifndef INT_MAX | 39 | #ifndef INT_MAX |
40 | #define INT_MAX 0x7FFFFFFF | 40 | #define INT_MAX 0x7FFFFFFF |
diff --git a/src/util/common_endian.c b/src/util/common_endian.c index 4c8ad7182..f29e42c98 100644 --- a/src/util/common_endian.c +++ b/src/util/common_endian.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include "platform.h" | 28 | #include "platform.h" |
29 | #include "gnunet_crypto_lib.h" | 29 | #include "gnunet_crypto_lib.h" |
30 | 30 | ||
31 | #define LOG(kind,...) GNUNET_log_from (kind, "util",__VA_ARGS__) | 31 | #define LOG(kind,...) GNUNET_log_from (kind, "util-common-endian",__VA_ARGS__) |
32 | 32 | ||
33 | 33 | ||
34 | uint64_t | 34 | uint64_t |
diff --git a/src/util/configuration_loader.c b/src/util/configuration_loader.c index 07eeb98f0..ceaf2a6ea 100644 --- a/src/util/configuration_loader.c +++ b/src/util/configuration_loader.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include "platform.h" | 27 | #include "platform.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__) | 30 | #define LOG(kind,...) GNUNET_log_from (kind, "util-configuration", __VA_ARGS__) |
31 | 31 | ||
32 | 32 | ||
33 | /** | 33 | /** |
diff --git a/src/util/connection.c b/src/util/connection.c index 02dd9f991..dfa673a86 100644 --- a/src/util/connection.c +++ b/src/util/connection.c | |||
@@ -35,9 +35,9 @@ | |||
35 | #include "gnunet_resolver_service.h" | 35 | #include "gnunet_resolver_service.h" |
36 | 36 | ||
37 | 37 | ||
38 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 38 | #define LOG(kind,...) GNUNET_log_from (kind, "util-connection", __VA_ARGS__) |
39 | 39 | ||
40 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util", syscall) | 40 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util-connection", syscall) |
41 | 41 | ||
42 | 42 | ||
43 | /** | 43 | /** |
diff --git a/src/util/container_bloomfilter.c b/src/util/container_bloomfilter.c index 58725dcc5..aedca232d 100644 --- a/src/util/container_bloomfilter.c +++ b/src/util/container_bloomfilter.c | |||
@@ -42,11 +42,11 @@ | |||
42 | #include "platform.h" | 42 | #include "platform.h" |
43 | #include "gnunet_util_lib.h" | 43 | #include "gnunet_util_lib.h" |
44 | 44 | ||
45 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 45 | #define LOG(kind,...) GNUNET_log_from (kind, "util-container-bloomfilter", __VA_ARGS__) |
46 | 46 | ||
47 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util", syscall) | 47 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util-container-bloomfilter", syscall) |
48 | 48 | ||
49 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util", syscall, filename) | 49 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util-container-bloomfilter", syscall, filename) |
50 | 50 | ||
51 | struct GNUNET_CONTAINER_BloomFilter | 51 | struct GNUNET_CONTAINER_BloomFilter |
52 | { | 52 | { |
diff --git a/src/util/container_heap.c b/src/util/container_heap.c index 1ead5ec6d..21bdee834 100644 --- a/src/util/container_heap.c +++ b/src/util/container_heap.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include "platform.h" | 28 | #include "platform.h" |
29 | #include "gnunet_container_lib.h" | 29 | #include "gnunet_container_lib.h" |
30 | 30 | ||
31 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 31 | #define LOG(kind,...) GNUNET_log_from (kind, "util-container-heap", __VA_ARGS__) |
32 | 32 | ||
33 | #define EXTRA_CHECKS 0 | 33 | #define EXTRA_CHECKS 0 |
34 | 34 | ||
diff --git a/src/util/container_meta_data.c b/src/util/container_meta_data.c index b4d231dae..ec527005a 100644 --- a/src/util/container_meta_data.c +++ b/src/util/container_meta_data.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #endif | 31 | #endif |
32 | #include <zlib.h> | 32 | #include <zlib.h> |
33 | 33 | ||
34 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 34 | #define LOG(kind,...) GNUNET_log_from (kind, "util-container-meta-data", __VA_ARGS__) |
35 | 35 | ||
36 | 36 | ||
37 | 37 | ||
diff --git a/src/util/container_multihashmap.c b/src/util/container_multihashmap.c index d85562579..ffeb4a71f 100644 --- a/src/util/container_multihashmap.c +++ b/src/util/container_multihashmap.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include "platform.h" | 26 | #include "platform.h" |
27 | #include "gnunet_container_lib.h" | 27 | #include "gnunet_container_lib.h" |
28 | 28 | ||
29 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 29 | #define LOG(kind,...) GNUNET_log_from (kind, "util-container-multihashmap", __VA_ARGS__) |
30 | 30 | ||
31 | /** | 31 | /** |
32 | * An entry in the hash map with the full key. | 32 | * An entry in the hash map with the full key. |
diff --git a/src/util/container_multihashmap32.c b/src/util/container_multihashmap32.c index 4cc9b7ebd..d33c3c2d9 100644 --- a/src/util/container_multihashmap32.c +++ b/src/util/container_multihashmap32.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include "platform.h" | 28 | #include "platform.h" |
29 | #include "gnunet_container_lib.h" | 29 | #include "gnunet_container_lib.h" |
30 | 30 | ||
31 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 31 | #define LOG(kind,...) GNUNET_log_from (kind, "util-container-multihashmap32", __VA_ARGS__) |
32 | 32 | ||
33 | /** | 33 | /** |
34 | * An entry in the hash map. | 34 | * An entry in the hash map. |
diff --git a/src/util/container_multipeermap.c b/src/util/container_multipeermap.c index 6c62e7403..7830771d8 100644 --- a/src/util/container_multipeermap.c +++ b/src/util/container_multipeermap.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include "platform.h" | 26 | #include "platform.h" |
27 | #include "gnunet_util_lib.h" | 27 | #include "gnunet_util_lib.h" |
28 | 28 | ||
29 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 29 | #define LOG(kind,...) GNUNET_log_from (kind, "util-container-multipeermap", __VA_ARGS__) |
30 | 30 | ||
31 | /** | 31 | /** |
32 | * An entry in the hash map with the full key. | 32 | * An entry in the hash map with the full key. |
diff --git a/src/util/container_multishortmap.c b/src/util/container_multishortmap.c index 5e8a47b09..cfa82ca20 100644 --- a/src/util/container_multishortmap.c +++ b/src/util/container_multishortmap.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include "platform.h" | 26 | #include "platform.h" |
27 | #include "gnunet_util_lib.h" | 27 | #include "gnunet_util_lib.h" |
28 | 28 | ||
29 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 29 | #define LOG(kind,...) GNUNET_log_from (kind, "util-container-multishortmap", __VA_ARGS__) |
30 | 30 | ||
31 | /** | 31 | /** |
32 | * An entry in the hash map with the full key. | 32 | * An entry in the hash map with the full key. |
diff --git a/src/util/crypto_crc.c b/src/util/crypto_crc.c index d7f5f7fc8..03b24d9f7 100644 --- a/src/util/crypto_crc.c +++ b/src/util/crypto_crc.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include "platform.h" | 30 | #include "platform.h" |
31 | #include "gnunet_crypto_lib.h" | 31 | #include "gnunet_crypto_lib.h" |
32 | 32 | ||
33 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 33 | #define LOG(kind,...) GNUNET_log_from (kind, "util-crypto-crc", __VA_ARGS__) |
34 | 34 | ||
35 | /* Avoid wasting space on 8-byte longs. */ | 35 | /* Avoid wasting space on 8-byte longs. */ |
36 | #if UINT_MAX >= 0xffffffff | 36 | #if UINT_MAX >= 0xffffffff |
diff --git a/src/util/crypto_ecc.c b/src/util/crypto_ecc.c index 3f9150762..eaa49a991 100644 --- a/src/util/crypto_ecc.c +++ b/src/util/crypto_ecc.c | |||
@@ -38,11 +38,11 @@ | |||
38 | */ | 38 | */ |
39 | #define CURVE "Ed25519" | 39 | #define CURVE "Ed25519" |
40 | 40 | ||
41 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 41 | #define LOG(kind,...) GNUNET_log_from (kind, "util-crypto-ecc", __VA_ARGS__) |
42 | 42 | ||
43 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util", syscall) | 43 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util-crypto-ecc", syscall) |
44 | 44 | ||
45 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util", syscall, filename) | 45 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util-crypto-ecc", syscall, filename) |
46 | 46 | ||
47 | /** | 47 | /** |
48 | * Log an error message at log-level 'level' that indicates | 48 | * Log an error message at log-level 'level' that indicates |
diff --git a/src/util/crypto_ecc_setup.c b/src/util/crypto_ecc_setup.c index 0ce55ddbf..2f2e2f122 100644 --- a/src/util/crypto_ecc_setup.c +++ b/src/util/crypto_ecc_setup.c | |||
@@ -27,11 +27,11 @@ | |||
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__) | 30 | #define LOG(kind,...) GNUNET_log_from (kind, "util-crypto-ecc", __VA_ARGS__) |
31 | 31 | ||
32 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util", syscall) | 32 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util-crypto-ecc", syscall) |
33 | 33 | ||
34 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util", syscall, filename) | 34 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util-crypto-ecc", syscall, filename) |
35 | 35 | ||
36 | /** | 36 | /** |
37 | * Log an error message at log-level 'level' that indicates | 37 | * Log an error message at log-level 'level' that indicates |
diff --git a/src/util/crypto_hash.c b/src/util/crypto_hash.c index 31824e72a..49dbacd0b 100644 --- a/src/util/crypto_hash.c +++ b/src/util/crypto_hash.c | |||
@@ -28,9 +28,9 @@ | |||
28 | #include "gnunet_strings_lib.h" | 28 | #include "gnunet_strings_lib.h" |
29 | #include <gcrypt.h> | 29 | #include <gcrypt.h> |
30 | 30 | ||
31 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 31 | #define LOG(kind,...) GNUNET_log_from (kind, "util-crypto-hash", __VA_ARGS__) |
32 | 32 | ||
33 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util", syscall, filename) | 33 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util-crypto-hash", syscall, filename) |
34 | 34 | ||
35 | /** | 35 | /** |
36 | * Hash block of given size. | 36 | * Hash block of given size. |
diff --git a/src/util/crypto_hash_file.c b/src/util/crypto_hash_file.c index ace5212c9..3e5900200 100644 --- a/src/util/crypto_hash_file.c +++ b/src/util/crypto_hash_file.c | |||
@@ -27,9 +27,9 @@ | |||
27 | #include "gnunet_util_lib.h" | 27 | #include "gnunet_util_lib.h" |
28 | #include <gcrypt.h> | 28 | #include <gcrypt.h> |
29 | 29 | ||
30 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 30 | #define LOG(kind,...) GNUNET_log_from (kind, "util-crypto-hash-file", __VA_ARGS__) |
31 | 31 | ||
32 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util", syscall, filename) | 32 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util-crypto-hash-file", syscall, filename) |
33 | 33 | ||
34 | 34 | ||
35 | /** | 35 | /** |
diff --git a/src/util/crypto_hkdf.c b/src/util/crypto_hkdf.c index c6c43f800..f04d3e675 100644 --- a/src/util/crypto_hkdf.c +++ b/src/util/crypto_hkdf.c | |||
@@ -36,7 +36,7 @@ | |||
36 | * - Matthias Wachs (08.10.2010) | 36 | * - Matthias Wachs (08.10.2010) |
37 | */ | 37 | */ |
38 | 38 | ||
39 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 39 | #define LOG(kind,...) GNUNET_log_from (kind, "util-crypto-hkdf", __VA_ARGS__) |
40 | 40 | ||
41 | /** | 41 | /** |
42 | * Set this to 0 if you compile this code outside of GNUnet. | 42 | * Set this to 0 if you compile this code outside of GNUnet. |
diff --git a/src/util/crypto_kdf.c b/src/util/crypto_kdf.c index 78fb1911a..6d7c5a096 100644 --- a/src/util/crypto_kdf.c +++ b/src/util/crypto_kdf.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include "platform.h" | 30 | #include "platform.h" |
31 | #include "gnunet_crypto_lib.h" | 31 | #include "gnunet_crypto_lib.h" |
32 | 32 | ||
33 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 33 | #define LOG(kind,...) GNUNET_log_from (kind, "util-crypto-kdf", __VA_ARGS__) |
34 | 34 | ||
35 | /** | 35 | /** |
36 | * @brief Derive key | 36 | * @brief Derive key |
diff --git a/src/util/crypto_mpi.c b/src/util/crypto_mpi.c index 668d5e602..ff3e9a8a7 100644 --- a/src/util/crypto_mpi.c +++ b/src/util/crypto_mpi.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include "gnunet_crypto_lib.h" | 29 | #include "gnunet_crypto_lib.h" |
30 | 30 | ||
31 | 31 | ||
32 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 32 | #define LOG(kind,...) GNUNET_log_from (kind, "util-crypto-mpi", __VA_ARGS__) |
33 | 33 | ||
34 | /** | 34 | /** |
35 | * Log an error message at log-level 'level' that indicates | 35 | * Log an error message at log-level 'level' that indicates |
diff --git a/src/util/crypto_random.c b/src/util/crypto_random.c index 8897ae24f..d5b5eb9ec 100644 --- a/src/util/crypto_random.c +++ b/src/util/crypto_random.c | |||
@@ -28,9 +28,9 @@ | |||
28 | #include "gnunet_crypto_lib.h" | 28 | #include "gnunet_crypto_lib.h" |
29 | #include <gcrypt.h> | 29 | #include <gcrypt.h> |
30 | 30 | ||
31 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 31 | #define LOG(kind,...) GNUNET_log_from (kind, "util-crypto-random", __VA_ARGS__) |
32 | 32 | ||
33 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util", syscall) | 33 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util-crypto-random", syscall) |
34 | 34 | ||
35 | 35 | ||
36 | /* TODO: ndurner, move this to plibc? */ | 36 | /* TODO: ndurner, move this to plibc? */ |
diff --git a/src/util/crypto_rsa.c b/src/util/crypto_rsa.c index 443d597e4..7a108c21b 100644 --- a/src/util/crypto_rsa.c +++ b/src/util/crypto_rsa.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <gcrypt.h> | 25 | #include <gcrypt.h> |
26 | #include "gnunet_crypto_lib.h" | 26 | #include "gnunet_crypto_lib.h" |
27 | 27 | ||
28 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 28 | #define LOG(kind,...) GNUNET_log_from (kind, "util-crypto-rsa", __VA_ARGS__) |
29 | 29 | ||
30 | 30 | ||
31 | /** | 31 | /** |
@@ -430,7 +430,7 @@ rsa_blinding_key_derive (const struct GNUNET_CRYPTO_RsaPublicKey *pkey, | |||
430 | char *xts = "Blinding KDF extrator HMAC key"; /* Trusts bks' randomness more */ | 430 | char *xts = "Blinding KDF extrator HMAC key"; /* Trusts bks' randomness more */ |
431 | struct RsaBlindingKey *blind; | 431 | struct RsaBlindingKey *blind; |
432 | gcry_mpi_t n; | 432 | gcry_mpi_t n; |
433 | 433 | ||
434 | blind = GNUNET_new (struct RsaBlindingKey); | 434 | blind = GNUNET_new (struct RsaBlindingKey); |
435 | GNUNET_assert( NULL != blind ); | 435 | GNUNET_assert( NULL != blind ); |
436 | 436 | ||
@@ -454,25 +454,25 @@ rsa_blinding_key_derive (const struct GNUNET_CRYPTO_RsaPublicKey *pkey, | |||
454 | } | 454 | } |
455 | 455 | ||
456 | 456 | ||
457 | /* | 457 | /* |
458 | We originally added GNUNET_CRYPTO_kdf_mod_mpi for the benifit of the | 458 | We originally added GNUNET_CRYPTO_kdf_mod_mpi for the benifit of the |
459 | previous routine. | 459 | previous routine. |
460 | 460 | ||
461 | There was previously a call to GNUNET_CRYPTO_kdf in | 461 | There was previously a call to GNUNET_CRYPTO_kdf in |
462 | bkey = rsa_blinding_key_derive (len, bks); | 462 | bkey = rsa_blinding_key_derive (len, bks); |
463 | that gives exactly len bits where | 463 | that gives exactly len bits where |
464 | len = GNUNET_CRYPTO_rsa_public_key_len (pkey); | 464 | len = GNUNET_CRYPTO_rsa_public_key_len (pkey); |
465 | 465 | ||
466 | Now r = 2^(len-1)/pkey.n is the probability that a set high bit being | 466 | Now r = 2^(len-1)/pkey.n is the probability that a set high bit being |
467 | okay, meaning bkey < pkey.n. It follows that (1-r)/2 of the time bkey > | 467 | okay, meaning bkey < pkey.n. It follows that (1-r)/2 of the time bkey > |
468 | pkey.n making the effective bkey be | 468 | pkey.n making the effective bkey be |
469 | bkey mod pkey.n = bkey - pkey.n | 469 | bkey mod pkey.n = bkey - pkey.n |
470 | so the effective bkey has its high bit set with probability r/2. | 470 | so the effective bkey has its high bit set with probability r/2. |
471 | 471 | ||
472 | We expect r to be close to 1/2 if the exchange is honest, but the | 472 | We expect r to be close to 1/2 if the exchange is honest, but the |
473 | exchange can choose r otherwise. | 473 | exchange can choose r otherwise. |
474 | 474 | ||
475 | In blind signing, the exchange sees | 475 | In blind signing, the exchange sees |
476 | B = bkey * S mod pkey.n | 476 | B = bkey * S mod pkey.n |
477 | On deposit, the exchange sees S so they can compute bkey' = B/S mod | 477 | On deposit, the exchange sees S so they can compute bkey' = B/S mod |
478 | pkey.n for all B they recorded to see if bkey' has it's high bit set. | 478 | pkey.n for all B they recorded to see if bkey' has it's high bit set. |
@@ -489,7 +489,7 @@ the wrong and right probabilities 1/3 and 1/4, respectively. | |||
489 | I feared this gives the exchange a meaningful fraction of a bit of | 489 | I feared this gives the exchange a meaningful fraction of a bit of |
490 | information per coin involved in the transaction. It sounds damaging if | 490 | information per coin involved in the transaction. It sounds damaging if |
491 | numerous coins were involved. And it could run across transactions in | 491 | numerous coins were involved. And it could run across transactions in |
492 | some scenarios. | 492 | some scenarios. |
493 | 493 | ||
494 | We fixed this by using a more uniform deterministic pseudo-random number | 494 | We fixed this by using a more uniform deterministic pseudo-random number |
495 | generator for blinding factors. I do not believe this to be a problem | 495 | generator for blinding factors. I do not believe this to be a problem |
@@ -748,7 +748,7 @@ GNUNET_CRYPTO_rsa_blind (const struct GNUNET_HashCode *hash, | |||
748 | } | 748 | } |
749 | 749 | ||
750 | data = rsa_full_domain_hash (pkey, hash); | 750 | data = rsa_full_domain_hash (pkey, hash); |
751 | if (NULL == data) | 751 | if (NULL == data) |
752 | goto rsa_gcd_validate_failure; | 752 | goto rsa_gcd_validate_failure; |
753 | 753 | ||
754 | bkey = rsa_blinding_key_derive (pkey, bks); | 754 | bkey = rsa_blinding_key_derive (pkey, bks); |
@@ -771,7 +771,7 @@ GNUNET_CRYPTO_rsa_blind (const struct GNUNET_HashCode *hash, | |||
771 | gcry_mpi_release (ne[0]); | 771 | gcry_mpi_release (ne[0]); |
772 | gcry_mpi_release (ne[1]); | 772 | gcry_mpi_release (ne[1]); |
773 | gcry_mpi_release (r_e); | 773 | gcry_mpi_release (r_e); |
774 | rsa_blinding_key_free (bkey); | 774 | rsa_blinding_key_free (bkey); |
775 | 775 | ||
776 | *buf_size = numeric_mpi_alloc_n_print (data_r_e, buf); | 776 | *buf_size = numeric_mpi_alloc_n_print (data_r_e, buf); |
777 | gcry_mpi_release (data_r_e); | 777 | gcry_mpi_release (data_r_e); |
@@ -917,7 +917,7 @@ GNUNET_CRYPTO_rsa_sign_fdh (const struct GNUNET_CRYPTO_RsaPrivateKey *key, | |||
917 | GNUNET_CRYPTO_rsa_public_key_free (pkey); | 917 | GNUNET_CRYPTO_rsa_public_key_free (pkey); |
918 | if (NULL == v) /* rsa_gcd_validate failed meaning */ | 918 | if (NULL == v) /* rsa_gcd_validate failed meaning */ |
919 | return NULL; /* our *own* RSA key is malicious. */ | 919 | return NULL; /* our *own* RSA key is malicious. */ |
920 | 920 | ||
921 | sig = rsa_sign_mpi (key, v); | 921 | sig = rsa_sign_mpi (key, v); |
922 | gcry_mpi_release (v); | 922 | gcry_mpi_release (v); |
923 | return sig; | 923 | return sig; |
@@ -1077,11 +1077,11 @@ GNUNET_CRYPTO_rsa_unblind (struct GNUNET_CRYPTO_RsaSignature *sig, | |||
1077 | } | 1077 | } |
1078 | 1078 | ||
1079 | bkey = rsa_blinding_key_derive (pkey, bks); | 1079 | bkey = rsa_blinding_key_derive (pkey, bks); |
1080 | if (NULL == bkey) | 1080 | if (NULL == bkey) |
1081 | { | 1081 | { |
1082 | /* RSA key is malicious since rsa_gcd_validate failed here. | 1082 | /* RSA key is malicious since rsa_gcd_validate failed here. |
1083 | * It should have failed during GNUNET_CRYPTO_rsa_blind too though, | 1083 | * It should have failed during GNUNET_CRYPTO_rsa_blind too though, |
1084 | * so the exchange is being malicious in an unfamilair way, maybe | 1084 | * so the exchange is being malicious in an unfamilair way, maybe |
1085 | * just trying to crash us. */ | 1085 | * just trying to crash us. */ |
1086 | GNUNET_break_op (0); | 1086 | GNUNET_break_op (0); |
1087 | gcry_mpi_release (n); | 1087 | gcry_mpi_release (n); |
@@ -1096,10 +1096,10 @@ GNUNET_CRYPTO_rsa_unblind (struct GNUNET_CRYPTO_RsaSignature *sig, | |||
1096 | n)) | 1096 | n)) |
1097 | { | 1097 | { |
1098 | /* We cannot find r mod n, so gcd(r,n) != 1, which should get * | 1098 | /* We cannot find r mod n, so gcd(r,n) != 1, which should get * |
1099 | * caught above, but we handle it the same here. */ | 1099 | * caught above, but we handle it the same here. */ |
1100 | GNUNET_break_op (0); | 1100 | GNUNET_break_op (0); |
1101 | gcry_mpi_release (r_inv); | 1101 | gcry_mpi_release (r_inv); |
1102 | rsa_blinding_key_free (bkey); | 1102 | rsa_blinding_key_free (bkey); |
1103 | gcry_mpi_release (n); | 1103 | gcry_mpi_release (n); |
1104 | gcry_mpi_release (s); | 1104 | gcry_mpi_release (s); |
1105 | return NULL; | 1105 | return NULL; |
@@ -1144,11 +1144,11 @@ GNUNET_CRYPTO_rsa_verify (const struct GNUNET_HashCode *hash, | |||
1144 | r = rsa_full_domain_hash (pkey, hash); | 1144 | r = rsa_full_domain_hash (pkey, hash); |
1145 | if (NULL == r) { | 1145 | if (NULL == r) { |
1146 | GNUNET_break_op (0); | 1146 | GNUNET_break_op (0); |
1147 | /* RSA key is malicious since rsa_gcd_validate failed here. | 1147 | /* RSA key is malicious since rsa_gcd_validate failed here. |
1148 | * It should have failed during GNUNET_CRYPTO_rsa_blind too though, | 1148 | * It should have failed during GNUNET_CRYPTO_rsa_blind too though, |
1149 | * so the exchange is being malicious in an unfamilair way, maybe | 1149 | * so the exchange is being malicious in an unfamilair way, maybe |
1150 | * just trying to crash us. Arguably, we've only an internal error | 1150 | * just trying to crash us. Arguably, we've only an internal error |
1151 | * though because we should've detected this in our previous call | 1151 | * though because we should've detected this in our previous call |
1152 | * to GNUNET_CRYPTO_rsa_unblind. */ | 1152 | * to GNUNET_CRYPTO_rsa_unblind. */ |
1153 | return GNUNET_NO; | 1153 | return GNUNET_NO; |
1154 | } | 1154 | } |
diff --git a/src/util/crypto_symmetric.c b/src/util/crypto_symmetric.c index 381a5d2f8..e25e2f1dd 100644 --- a/src/util/crypto_symmetric.c +++ b/src/util/crypto_symmetric.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include "gnunet_crypto_lib.h" | 29 | #include "gnunet_crypto_lib.h" |
30 | #include <gcrypt.h> | 30 | #include <gcrypt.h> |
31 | 31 | ||
32 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 32 | #define LOG(kind,...) GNUNET_log_from (kind, "util-crypto-symmetric", __VA_ARGS__) |
33 | 33 | ||
34 | /** | 34 | /** |
35 | * Create a new SessionKey (for symmetric encryption). | 35 | * Create a new SessionKey (for symmetric encryption). |
diff --git a/src/util/disk.c b/src/util/disk.c index 40043549b..305607594 100644 --- a/src/util/disk.c +++ b/src/util/disk.c | |||
@@ -28,11 +28,11 @@ | |||
28 | #include "gnunet_strings_lib.h" | 28 | #include "gnunet_strings_lib.h" |
29 | #include "gnunet_disk_lib.h" | 29 | #include "gnunet_disk_lib.h" |
30 | 30 | ||
31 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 31 | #define LOG(kind,...) GNUNET_log_from (kind, "util-disk", __VA_ARGS__) |
32 | 32 | ||
33 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util", syscall) | 33 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util-disk", syscall) |
34 | 34 | ||
35 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util", syscall, filename) | 35 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util-disk", syscall, filename) |
36 | 36 | ||
37 | /** | 37 | /** |
38 | * Block size for IO for copying files. | 38 | * Block size for IO for copying files. |
diff --git a/src/util/getopt.c b/src/util/getopt.c index e150496ae..ff62dba9b 100644 --- a/src/util/getopt.c +++ b/src/util/getopt.c | |||
@@ -47,9 +47,9 @@ Copyright Copyright (C) 2006 Christian Grothoff | |||
47 | #endif | 47 | #endif |
48 | #endif | 48 | #endif |
49 | 49 | ||
50 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 50 | #define LOG(kind,...) GNUNET_log_from (kind, "util-getopt", __VA_ARGS__) |
51 | 51 | ||
52 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util", syscall) | 52 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util-getopt", syscall) |
53 | 53 | ||
54 | #if defined (WIN32) && !defined (__CYGWIN32__) | 54 | #if defined (WIN32) && !defined (__CYGWIN32__) |
55 | /* It's not Unix, really. See? Capital letters. */ | 55 | /* It's not Unix, really. See? Capital letters. */ |
diff --git a/src/util/getopt_helpers.c b/src/util/getopt_helpers.c index ab0b67412..4d7104503 100644 --- a/src/util/getopt_helpers.c +++ b/src/util/getopt_helpers.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include "platform.h" | 26 | #include "platform.h" |
27 | #include "gnunet_util_lib.h" | 27 | #include "gnunet_util_lib.h" |
28 | 28 | ||
29 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 29 | #define LOG(kind,...) GNUNET_log_from (kind, "util-getopt", __VA_ARGS__) |
30 | 30 | ||
31 | 31 | ||
32 | /** | 32 | /** |
diff --git a/src/util/load.c b/src/util/load.c index d374d7a17..d1de6aa36 100644 --- a/src/util/load.c +++ b/src/util/load.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include "gnunet_util_lib.h" | 27 | #include "gnunet_util_lib.h" |
28 | 28 | ||
29 | 29 | ||
30 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 30 | #define LOG(kind,...) GNUNET_log_from (kind, "util-load", __VA_ARGS__) |
31 | 31 | ||
32 | /** | 32 | /** |
33 | * Values we track for load calculations. | 33 | * Values we track for load calculations. |
diff --git a/src/util/mq.c b/src/util/mq.c index 95bcd71cb..a8216d964 100644 --- a/src/util/mq.c +++ b/src/util/mq.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include "platform.h" | 26 | #include "platform.h" |
27 | #include "gnunet_util_lib.h" | 27 | #include "gnunet_util_lib.h" |
28 | 28 | ||
29 | #define LOG(kind,...) GNUNET_log_from (kind, "mq",__VA_ARGS__) | 29 | #define LOG(kind,...) GNUNET_log_from (kind, "util-mq",__VA_ARGS__) |
30 | 30 | ||
31 | 31 | ||
32 | struct GNUNET_MQ_Envelope | 32 | struct GNUNET_MQ_Envelope |
@@ -235,24 +235,29 @@ GNUNET_MQ_inject_message (struct GNUNET_MQ_Handle *mq, | |||
235 | { | 235 | { |
236 | const struct GNUNET_MQ_MessageHandler *handler; | 236 | const struct GNUNET_MQ_MessageHandler *handler; |
237 | int handled = GNUNET_NO; | 237 | int handled = GNUNET_NO; |
238 | uint16_t ms = ntohs (mh->size); | 238 | uint16_t msize = ntohs (mh->size); |
239 | uint16_t mtype = ntohs (mh->type); | ||
240 | |||
241 | LOG (GNUNET_ERROR_TYPE_DEBUG, | ||
242 | "Received message of type %u and size %u\n", | ||
243 | mtype, msize); | ||
239 | 244 | ||
240 | if (NULL == mq->handlers) | 245 | if (NULL == mq->handlers) |
241 | goto done; | 246 | goto done; |
242 | for (handler = mq->handlers; NULL != handler->cb; handler++) | 247 | for (handler = mq->handlers; NULL != handler->cb; handler++) |
243 | { | 248 | { |
244 | if (handler->type == ntohs (mh->type)) | 249 | if (handler->type == mtype) |
245 | { | 250 | { |
246 | handled = GNUNET_YES; | 251 | handled = GNUNET_YES; |
247 | if ( (handler->expected_size > ms) || | 252 | if ( (handler->expected_size > msize) || |
248 | ( (handler->expected_size != ms) && | 253 | ( (handler->expected_size != msize) && |
249 | (NULL == handler->mv) ) ) | 254 | (NULL == handler->mv) ) ) |
250 | { | 255 | { |
251 | /* Too small, or not an exact size and | 256 | /* Too small, or not an exact size and |
252 | no 'mv' handler to check rest */ | 257 | no 'mv' handler to check rest */ |
253 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 258 | LOG (GNUNET_ERROR_TYPE_ERROR, |
254 | "Received malformed message of type %u\n", | 259 | "Received malformed message of type %u\n", |
255 | (unsigned int) handler->type); | 260 | (unsigned int) handler->type); |
256 | GNUNET_MQ_inject_error (mq, | 261 | GNUNET_MQ_inject_error (mq, |
257 | GNUNET_MQ_ERROR_MALFORMED); | 262 | GNUNET_MQ_ERROR_MALFORMED); |
258 | break; | 263 | break; |
@@ -267,9 +272,9 @@ GNUNET_MQ_inject_message (struct GNUNET_MQ_Handle *mq, | |||
267 | else | 272 | else |
268 | { | 273 | { |
269 | /* Message rejected by check routine */ | 274 | /* Message rejected by check routine */ |
270 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 275 | LOG (GNUNET_ERROR_TYPE_ERROR, |
271 | "Received malformed message of type %u\n", | 276 | "Received malformed message of type %u\n", |
272 | (unsigned int) handler->type); | 277 | (unsigned int) handler->type); |
273 | GNUNET_MQ_inject_error (mq, | 278 | GNUNET_MQ_inject_error (mq, |
274 | GNUNET_MQ_ERROR_MALFORMED); | 279 | GNUNET_MQ_ERROR_MALFORMED); |
275 | } | 280 | } |
@@ -279,9 +284,8 @@ GNUNET_MQ_inject_message (struct GNUNET_MQ_Handle *mq, | |||
279 | done: | 284 | done: |
280 | if (GNUNET_NO == handled) | 285 | if (GNUNET_NO == handled) |
281 | LOG (GNUNET_ERROR_TYPE_INFO, | 286 | LOG (GNUNET_ERROR_TYPE_INFO, |
282 | "No handler for message of type %d and size %d\n", | 287 | "No handler for message of type %u and size %u\n", |
283 | ntohs (mh->type), | 288 | mtype, msize); |
284 | ntohs (mh->size)); | ||
285 | } | 289 | } |
286 | 290 | ||
287 | 291 | ||
@@ -756,9 +760,13 @@ server_client_send_impl (struct GNUNET_MQ_Handle *mq, | |||
756 | const struct GNUNET_MessageHeader *msg, | 760 | const struct GNUNET_MessageHeader *msg, |
757 | void *impl_state) | 761 | void *impl_state) |
758 | { | 762 | { |
759 | struct ServerClientSocketState *state = impl_state; | ||
760 | |||
761 | GNUNET_assert (NULL != mq); | 763 | GNUNET_assert (NULL != mq); |
764 | |||
765 | LOG (GNUNET_ERROR_TYPE_DEBUG, | ||
766 | "Transmitting message of type %u and size %u\n", | ||
767 | ntohs (msg->type), ntohs (msg->size)); | ||
768 | |||
769 | struct ServerClientSocketState *state = impl_state; | ||
762 | state->th = GNUNET_SERVER_notify_transmit_ready (state->client, | 770 | state->th = GNUNET_SERVER_notify_transmit_ready (state->client, |
763 | ntohs (msg->size), | 771 | ntohs (msg->size), |
764 | GNUNET_TIME_UNIT_FOREVER_REL, | 772 | GNUNET_TIME_UNIT_FOREVER_REL, |
diff --git a/src/util/mst.c b/src/util/mst.c index 1422c248e..9f1d30d7a 100644 --- a/src/util/mst.c +++ b/src/util/mst.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #define ALIGN_FACTOR 8 | 34 | #define ALIGN_FACTOR 8 |
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 37 | #define LOG(kind,...) GNUNET_log_from (kind, "util-mst", __VA_ARGS__) |
38 | 38 | ||
39 | 39 | ||
40 | /** | 40 | /** |
diff --git a/src/util/network.c b/src/util/network.c index 67f2801c5..c82caafd9 100644 --- a/src/util/network.c +++ b/src/util/network.c | |||
@@ -28,9 +28,9 @@ | |||
28 | #include "gnunet_util_lib.h" | 28 | #include "gnunet_util_lib.h" |
29 | #include "disk.h" | 29 | #include "disk.h" |
30 | 30 | ||
31 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 31 | #define LOG(kind,...) GNUNET_log_from (kind, "util-network", __VA_ARGS__) |
32 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util", syscall, filename) | 32 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util-network", syscall, filename) |
33 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util", syscall) | 33 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util-network", syscall) |
34 | 34 | ||
35 | #define DEBUG_NETWORK GNUNET_EXTRA_LOGGING | 35 | #define DEBUG_NETWORK GNUNET_EXTRA_LOGGING |
36 | 36 | ||
diff --git a/src/util/os_installation.c b/src/util/os_installation.c index ea3ae3e79..caceeea0c 100644 --- a/src/util/os_installation.c +++ b/src/util/os_installation.c | |||
@@ -44,9 +44,9 @@ | |||
44 | #endif | 44 | #endif |
45 | 45 | ||
46 | 46 | ||
47 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 47 | #define LOG(kind,...) GNUNET_log_from (kind, "util-os-installation", __VA_ARGS__) |
48 | 48 | ||
49 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util", syscall, filename) | 49 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util-os-installation", syscall, filename) |
50 | 50 | ||
51 | 51 | ||
52 | /** | 52 | /** |
diff --git a/src/util/os_network.c b/src/util/os_network.c index 5e4546d08..2ac1a16d3 100644 --- a/src/util/os_network.c +++ b/src/util/os_network.c | |||
@@ -31,8 +31,8 @@ | |||
31 | #include "gnunet_util_lib.h" | 31 | #include "gnunet_util_lib.h" |
32 | 32 | ||
33 | 33 | ||
34 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 34 | #define LOG(kind,...) GNUNET_log_from (kind, "util-os-network", __VA_ARGS__) |
35 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util", syscall, filename) | 35 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util-os-network", syscall, filename) |
36 | 36 | ||
37 | 37 | ||
38 | #if ! (HAVE_GETIFADDRS && HAVE_FREEIFADDRS) | 38 | #if ! (HAVE_GETIFADDRS && HAVE_FREEIFADDRS) |
diff --git a/src/util/os_priority.c b/src/util/os_priority.c index 4b1dbd491..6888f9b83 100644 --- a/src/util/os_priority.c +++ b/src/util/os_priority.c | |||
@@ -29,11 +29,11 @@ | |||
29 | #include "disk.h" | 29 | #include "disk.h" |
30 | #include <unistr.h> | 30 | #include <unistr.h> |
31 | 31 | ||
32 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 32 | #define LOG(kind,...) GNUNET_log_from (kind, "util-os-priority", __VA_ARGS__) |
33 | 33 | ||
34 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util", syscall) | 34 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util-os-priority", syscall) |
35 | 35 | ||
36 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util", syscall, filename) | 36 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util-os-priority", syscall, filename) |
37 | 37 | ||
38 | #define GNUNET_OS_CONTROL_PIPE "GNUNET_OS_CONTROL_PIPE" | 38 | #define GNUNET_OS_CONTROL_PIPE "GNUNET_OS_CONTROL_PIPE" |
39 | 39 | ||
diff --git a/src/util/peer.c b/src/util/peer.c index 5d54a4301..b637dc229 100644 --- a/src/util/peer.c +++ b/src/util/peer.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include "platform.h" | 26 | #include "platform.h" |
27 | #include "gnunet_peer_lib.h" | 27 | #include "gnunet_peer_lib.h" |
28 | 28 | ||
29 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 29 | #define LOG(kind,...) GNUNET_log_from (kind, "util-peer", __VA_ARGS__) |
30 | 30 | ||
31 | 31 | ||
32 | struct PeerEntry | 32 | struct PeerEntry |
diff --git a/src/util/plugin.c b/src/util/plugin.c index c7ac47a7c..fb296f80d 100644 --- a/src/util/plugin.c +++ b/src/util/plugin.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <ltdl.h> | 28 | #include <ltdl.h> |
29 | #include "gnunet_util_lib.h" | 29 | #include "gnunet_util_lib.h" |
30 | 30 | ||
31 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 31 | #define LOG(kind,...) GNUNET_log_from (kind, "util-plugin", __VA_ARGS__) |
32 | 32 | ||
33 | /** | 33 | /** |
34 | * Linked list of active plugins. | 34 | * Linked list of active plugins. |
diff --git a/src/util/program.c b/src/util/program.c index d0dd49909..e2b356f88 100644 --- a/src/util/program.c +++ b/src/util/program.c | |||
@@ -31,9 +31,9 @@ | |||
31 | #include "speedup.h" | 31 | #include "speedup.h" |
32 | #include <gcrypt.h> | 32 | #include <gcrypt.h> |
33 | 33 | ||
34 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 34 | #define LOG(kind,...) GNUNET_log_from (kind, "util-program", __VA_ARGS__) |
35 | 35 | ||
36 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util", syscall, filename) | 36 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util-program", syscall, filename) |
37 | 37 | ||
38 | /** | 38 | /** |
39 | * Context for the command. | 39 | * Context for the command. |
diff --git a/src/util/resolver_api.c b/src/util/resolver_api.c index fdeaed006..f33c31f1c 100644 --- a/src/util/resolver_api.c +++ b/src/util/resolver_api.c | |||
@@ -29,9 +29,9 @@ | |||
29 | #include "gnunet_resolver_service.h" | 29 | #include "gnunet_resolver_service.h" |
30 | #include "resolver.h" | 30 | #include "resolver.h" |
31 | 31 | ||
32 | #define LOG(kind,...) GNUNET_log_from (kind, "resolver-api", __VA_ARGS__) | 32 | #define LOG(kind,...) GNUNET_log_from (kind, "util-resolver-api", __VA_ARGS__) |
33 | 33 | ||
34 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "resolver-api", syscall) | 34 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util-resolver-api", syscall) |
35 | 35 | ||
36 | /** | 36 | /** |
37 | * Maximum supported length for a hostname | 37 | * Maximum supported length for a hostname |
@@ -250,7 +250,7 @@ void | |||
250 | GNUNET_RESOLVER_disconnect () | 250 | GNUNET_RESOLVER_disconnect () |
251 | { | 251 | { |
252 | struct GNUNET_RESOLVER_RequestHandle *rh; | 252 | struct GNUNET_RESOLVER_RequestHandle *rh; |
253 | 253 | ||
254 | while (NULL != (rh = req_head)) | 254 | while (NULL != (rh = req_head)) |
255 | { | 255 | { |
256 | GNUNET_assert (GNUNET_SYSERR == rh->was_transmitted); | 256 | GNUNET_assert (GNUNET_SYSERR == rh->was_transmitted); |
@@ -298,7 +298,7 @@ static void | |||
298 | check_disconnect () | 298 | check_disconnect () |
299 | { | 299 | { |
300 | struct GNUNET_RESOLVER_RequestHandle *rh; | 300 | struct GNUNET_RESOLVER_RequestHandle *rh; |
301 | 301 | ||
302 | for (rh = req_head; NULL != rh; rh = rh->next) | 302 | for (rh = req_head; NULL != rh; rh = rh->next) |
303 | if (GNUNET_SYSERR != rh->was_transmitted) | 303 | if (GNUNET_SYSERR != rh->was_transmitted) |
304 | return; | 304 | return; |
diff --git a/src/util/server.c b/src/util/server.c index 00e37c9d9..d7da5c6c0 100644 --- a/src/util/server.c +++ b/src/util/server.c | |||
@@ -28,11 +28,11 @@ | |||
28 | #include "gnunet_util_lib.h" | 28 | #include "gnunet_util_lib.h" |
29 | #include "gnunet_protocols.h" | 29 | #include "gnunet_protocols.h" |
30 | 30 | ||
31 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 31 | #define LOG(kind,...) GNUNET_log_from (kind, "util-server", __VA_ARGS__) |
32 | 32 | ||
33 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util", syscall) | 33 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util-server", syscall) |
34 | 34 | ||
35 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util", syscall, filename) | 35 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util-server", syscall, filename) |
36 | 36 | ||
37 | 37 | ||
38 | /** | 38 | /** |
diff --git a/src/util/server_mst.c b/src/util/server_mst.c index 8c9bc4b5b..5155b54da 100644 --- a/src/util/server_mst.c +++ b/src/util/server_mst.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #define ALIGN_FACTOR 8 | 34 | #define ALIGN_FACTOR 8 |
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 37 | #define LOG(kind,...) GNUNET_log_from (kind, "util-server-mst", __VA_ARGS__) |
38 | 38 | ||
39 | 39 | ||
40 | /** | 40 | /** |
diff --git a/src/util/server_tc.c b/src/util/server_tc.c index 40a8ba015..8ae380a85 100644 --- a/src/util/server_tc.c +++ b/src/util/server_tc.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include "gnunet_util_lib.h" | 29 | #include "gnunet_util_lib.h" |
30 | 30 | ||
31 | 31 | ||
32 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 32 | #define LOG(kind,...) GNUNET_log_from (kind, "util-server-tc", __VA_ARGS__) |
33 | 33 | ||
34 | 34 | ||
35 | /** | 35 | /** |
diff --git a/src/util/service.c b/src/util/service.c index 11128425d..496904fb1 100644 --- a/src/util/service.c +++ b/src/util/service.c | |||
@@ -36,11 +36,11 @@ | |||
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | 38 | ||
39 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 39 | #define LOG(kind,...) GNUNET_log_from (kind, "util-service", __VA_ARGS__) |
40 | 40 | ||
41 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util", syscall) | 41 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util-service", syscall) |
42 | 42 | ||
43 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util", syscall, filename) | 43 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util-service", syscall, filename) |
44 | 44 | ||
45 | 45 | ||
46 | /* ******************* access control ******************** */ | 46 | /* ******************* access control ******************** */ |
diff --git a/src/util/service_new.c b/src/util/service_new.c index 731be2cfe..a832b070c 100644 --- a/src/util/service_new.c +++ b/src/util/service_new.c | |||
@@ -37,11 +37,11 @@ | |||
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | 39 | ||
40 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 40 | #define LOG(kind,...) GNUNET_log_from (kind, "util-service", __VA_ARGS__) |
41 | 41 | ||
42 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util", syscall) | 42 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util-service", syscall) |
43 | 43 | ||
44 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util", syscall, filename) | 44 | #define LOG_STRERROR_FILE(kind,syscall,filename) GNUNET_log_from_strerror_file (kind, "util-service", syscall, filename) |
45 | 45 | ||
46 | 46 | ||
47 | /** | 47 | /** |
diff --git a/src/util/signal.c b/src/util/signal.c index 543fcd899..cb917e36a 100644 --- a/src/util/signal.c +++ b/src/util/signal.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include "platform.h" | 27 | #include "platform.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__) | 30 | #define LOG(kind,...) GNUNET_log_from (kind, "util-signal", __VA_ARGS__) |
31 | 31 | ||
32 | 32 | ||
33 | struct GNUNET_SIGNAL_Context | 33 | struct GNUNET_SIGNAL_Context |
diff --git a/src/util/socks.c b/src/util/socks.c index fee79cc80..37e60e3e4 100644 --- a/src/util/socks.c +++ b/src/util/socks.c | |||
@@ -29,9 +29,9 @@ | |||
29 | #include "gnunet_util_lib.h" | 29 | #include "gnunet_util_lib.h" |
30 | 30 | ||
31 | 31 | ||
32 | #define LOG(kind,...) GNUNET_log_from (kind, "socks", __VA_ARGS__) | 32 | #define LOG(kind,...) GNUNET_log_from (kind, "util-socks", __VA_ARGS__) |
33 | 33 | ||
34 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "socks", syscall) | 34 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util-socks", syscall) |
35 | 35 | ||
36 | 36 | ||
37 | /* SOCKS5 authentication methods */ | 37 | /* SOCKS5 authentication methods */ |
diff --git a/src/util/speedup.c b/src/util/speedup.c index 97df65c8e..c6a4cf678 100644 --- a/src/util/speedup.c +++ b/src/util/speedup.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include "gnunet_util_lib.h" | 27 | #include "gnunet_util_lib.h" |
28 | #include "speedup.h" | 28 | #include "speedup.h" |
29 | 29 | ||
30 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 30 | #define LOG(kind,...) GNUNET_log_from (kind, "util-speedup", __VA_ARGS__) |
31 | 31 | ||
32 | 32 | ||
33 | static struct GNUNET_TIME_Relative interval; | 33 | static struct GNUNET_TIME_Relative interval; |
diff --git a/src/util/strings.c b/src/util/strings.c index 291255344..d3268f4d9 100644 --- a/src/util/strings.c +++ b/src/util/strings.c | |||
@@ -34,9 +34,9 @@ | |||
34 | #include <unistr.h> | 34 | #include <unistr.h> |
35 | #include <uniconv.h> | 35 | #include <uniconv.h> |
36 | 36 | ||
37 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 37 | #define LOG(kind,...) GNUNET_log_from (kind, "util-strings", __VA_ARGS__) |
38 | 38 | ||
39 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util", syscall) | 39 | #define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util-strings", syscall) |
40 | 40 | ||
41 | 41 | ||
42 | /** | 42 | /** |
diff --git a/src/util/time.c b/src/util/time.c index 89b0c2d44..19100ac36 100644 --- a/src/util/time.c +++ b/src/util/time.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include "gnunet_crypto_lib.h" | 27 | #include "gnunet_crypto_lib.h" |
28 | #include "gnunet_time_lib.h" | 28 | #include "gnunet_time_lib.h" |
29 | 29 | ||
30 | #define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) | 30 | #define LOG(kind,...) GNUNET_log_from (kind, "util-time", __VA_ARGS__) |
31 | 31 | ||
32 | /** | 32 | /** |
33 | * Variable used to simulate clock skew. Used for testing, never in production. | 33 | * Variable used to simulate clock skew. Used for testing, never in production. |
diff --git a/src/util/winproc.c b/src/util/winproc.c index 66c225ce5..318b68a88 100644 --- a/src/util/winproc.c +++ b/src/util/winproc.c | |||
@@ -69,7 +69,7 @@ TAddAce GNAddAce; | |||
69 | TAddAccessAllowedAce GNAddAccessAllowedAce; | 69 | TAddAccessAllowedAce GNAddAccessAllowedAce; |
70 | TSetNamedSecurityInfo GNSetNamedSecurityInfo; | 70 | TSetNamedSecurityInfo GNSetNamedSecurityInfo; |
71 | 71 | ||
72 | #define LOG(kind,...) GNUNET_log_from (kind, "winproc", __VA_ARGS__) | 72 | #define LOG(kind,...) GNUNET_log_from (kind, "util-winproc", __VA_ARGS__) |
73 | /** | 73 | /** |
74 | * Log (panic) messages from PlibC | 74 | * Log (panic) messages from PlibC |
75 | */ | 75 | */ |