diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-07-14 19:15:15 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-07-14 19:15:15 +0000 |
commit | 479dfecfe163262e82d0d0cabaeffd9947df5619 (patch) | |
tree | 0c988f2cc86e4cbe2f9b45a788e40d5cc73ad26e /src/nse | |
parent | 020064b5502a4ec9f635591b569ec3b370d5610a (diff) | |
download | gnunet-479dfecfe163262e82d0d0cabaeffd9947df5619.tar.gz gnunet-479dfecfe163262e82d0d0cabaeffd9947df5619.zip |
-improved debug logic
Diffstat (limited to 'src/nse')
-rw-r--r-- | src/nse/gnunet-service-nse.c | 10 | ||||
-rw-r--r-- | src/nse/nse.h | 5 |
2 files changed, 7 insertions, 8 deletions
diff --git a/src/nse/gnunet-service-nse.c b/src/nse/gnunet-service-nse.c index b93f7bb14..63ef90859 100644 --- a/src/nse/gnunet-service-nse.c +++ b/src/nse/gnunet-service-nse.c | |||
@@ -59,6 +59,11 @@ | |||
59 | #define USE_RANDOM_DELAYS GNUNET_YES | 59 | #define USE_RANDOM_DELAYS GNUNET_YES |
60 | 60 | ||
61 | /** | 61 | /** |
62 | * Generate extensive debug-level log messages? | ||
63 | */ | ||
64 | #define DEBUG_NSE GNUNET_NO | ||
65 | |||
66 | /** | ||
62 | * Over how many values do we calculate the weighted average? | 67 | * Over how many values do we calculate the weighted average? |
63 | */ | 68 | */ |
64 | #define HISTORY_SIZE 64 | 69 | #define HISTORY_SIZE 64 |
@@ -1052,9 +1057,8 @@ handle_p2p_size_estimate (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
1052 | GNUNET_snprintf (origin, sizeof (origin), "%s", GNUNET_i2s (&os)); | 1057 | GNUNET_snprintf (origin, sizeof (origin), "%s", GNUNET_i2s (&os)); |
1053 | GNUNET_snprintf (pred, sizeof (pred), "%s", GNUNET_i2s (peer)); | 1058 | GNUNET_snprintf (pred, sizeof (pred), "%s", GNUNET_i2s (peer)); |
1054 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1059 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1055 | "Flood at %llu from `%s' via `%s' at `%s' with bits %u\n", | 1060 | "Flood at %s from `%s' via `%s' at `%s' with bits %u\n", |
1056 | (unsigned long long) | 1061 | GNUNET_STRINGS_absolute_time_to_string (GNUNET_TIME_absolute_ntoh (incoming_flood->timestamp)), |
1057 | GNUNET_TIME_absolute_ntoh (incoming_flood->timestamp).abs_value, | ||
1058 | origin, pred, GNUNET_i2s (&my_identity), | 1062 | origin, pred, GNUNET_i2s (&my_identity), |
1059 | (unsigned int) matching_bits); | 1063 | (unsigned int) matching_bits); |
1060 | } | 1064 | } |
diff --git a/src/nse/nse.h b/src/nse/nse.h index 637e49f9d..19f62897a 100644 --- a/src/nse/nse.h +++ b/src/nse/nse.h | |||
@@ -30,11 +30,6 @@ | |||
30 | 30 | ||
31 | #include "gnunet_common.h" | 31 | #include "gnunet_common.h" |
32 | 32 | ||
33 | /** | ||
34 | * Generate debug-level log messages? | ||
35 | */ | ||
36 | #define DEBUG_NSE GNUNET_EXTRA_LOGGING | ||
37 | |||
38 | GNUNET_NETWORK_STRUCT_BEGIN | 33 | GNUNET_NETWORK_STRUCT_BEGIN |
39 | 34 | ||
40 | /** | 35 | /** |