From: Christian Grothoff Date: Sat, 21 Jan 2017 18:52:32 +0000 (+0100) Subject: more LOG macros X-Git-Tag: taler-0.2.1~400 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2f08c7b179b4a6ac77d152e594a3051769451849;p=oweals%2Fgnunet.git more LOG macros --- diff --git a/src/cadet/gnunet-service-cadet-new_core.c b/src/cadet/gnunet-service-cadet-new_core.c index 39a6a9296..d857a577e 100644 --- a/src/cadet/gnunet-service-cadet-new_core.c +++ b/src/cadet/gnunet-service-cadet-new_core.c @@ -38,6 +38,10 @@ #include "gnunet_core_service.h" #include "cadet_protocol.h" + +#define LOG(level, ...) GNUNET_log_from(level,"cadet-cor",__VA_ARGS__) + + /** * Number of messages we are willing to buffer per route. */ diff --git a/src/cadet/gnunet-service-cadet-new_dht.c b/src/cadet/gnunet-service-cadet-new_dht.c index 3cf3f0301..981553601 100644 --- a/src/cadet/gnunet-service-cadet-new_dht.c +++ b/src/cadet/gnunet-service-cadet-new_dht.c @@ -271,9 +271,6 @@ GCD_search (const struct GNUNET_PeerIdentity *peer_id) struct GNUNET_HashCode phash; struct GCD_search_handle *h; - LOG (GNUNET_ERROR_TYPE_DEBUG, - "Starting DHT GET for peer %s\n", - GNUNET_i2s (peer_id)); GNUNET_STATISTICS_update (stats, "# DHT search", 1, @@ -296,6 +293,10 @@ GCD_search (const struct GNUNET_PeerIdentity *peer_id) 0, /* xquery bits */ &dht_get_id_handler, h); + LOG (GNUNET_ERROR_TYPE_DEBUG, + "Starting DHT GET for peer %s (%p)\n", + GNUNET_i2s (peer_id), + h); return h; } @@ -308,6 +309,9 @@ GCD_search (const struct GNUNET_PeerIdentity *peer_id) void GCD_search_stop (struct GCD_search_handle *h) { + LOG (GNUNET_ERROR_TYPE_DEBUG, + "Stopping DHT GET %p\n", + h); GNUNET_DHT_get_stop (h->dhtget); GNUNET_free (h); } diff --git a/src/cadet/gnunet-service-cadet-new_hello.c b/src/cadet/gnunet-service-cadet-new_hello.c index d705cdd5f..7c8ba3b25 100644 --- a/src/cadet/gnunet-service-cadet-new_hello.c +++ b/src/cadet/gnunet-service-cadet-new_hello.c @@ -52,7 +52,7 @@ static struct GNUNET_PEERINFO_Handle *peerinfo; /** * Iterator context. */ -static struct GNUNET_PEERINFO_NotifyContext* nc; +static struct GNUNET_PEERINFO_NotifyContext *nc; /** diff --git a/src/cadet/gnunet-service-cadet-new_paths.c b/src/cadet/gnunet-service-cadet-new_paths.c index 3cfce337c..d945487d0 100644 --- a/src/cadet/gnunet-service-cadet-new_paths.c +++ b/src/cadet/gnunet-service-cadet-new_paths.c @@ -34,6 +34,9 @@ #include "gnunet-service-cadet-new_paths.h" +#define LOG(level, ...) GNUNET_log_from(level,"cadet-pat",__VA_ARGS__) + + /** * Information regarding a possible path to reach a peer. */ diff --git a/src/cadet/gnunet-service-cadet-new_peer.c b/src/cadet/gnunet-service-cadet-new_peer.c index 1cb79a02f..a6485b0ad 100644 --- a/src/cadet/gnunet-service-cadet-new_peer.c +++ b/src/cadet/gnunet-service-cadet-new_peer.c @@ -48,6 +48,10 @@ #include "gnunet-service-cadet-new_paths.h" #include "gnunet-service-cadet-new_tunnels.h" + +#define LOG(level, ...) GNUNET_log_from(level,"cadet-per",__VA_ARGS__) + + /** * How long do we wait until tearing down an idle peer? */