From d3eb5c204a022cd4d01b670d3978472ca364d3df Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 25 May 2011 10:23:29 +0000 Subject: [PATCH] nicer debugs --- src/fs/gnunet-service-fs.c | 2 +- src/fs/gnunet-service-fs_lc.c | 6 +++--- src/fs/gnunet-service-fs_pe.c | 3 ++- src/fs/gnunet-service-fs_pr.c | 6 +++--- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c index 96ed39c94..87cdd8322 100644 --- a/src/fs/gnunet-service-fs.c +++ b/src/fs/gnunet-service-fs.c @@ -330,7 +330,7 @@ start_p2p_processing (void *cls, struct GSF_PendingRequestData *prd; prd = GSF_pending_request_get_data_ (pr); -#if DEBUG_FS +#if DEBUG_FS_CLIENT GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Finished database lookup for local request `%s' with result %d\n", GNUNET_h2s (&prd->query), diff --git a/src/fs/gnunet-service-fs_lc.c b/src/fs/gnunet-service-fs_lc.c index 11b26c452..fe22bd099 100644 --- a/src/fs/gnunet-service-fs_lc.c +++ b/src/fs/gnunet-service-fs_lc.c @@ -274,7 +274,7 @@ client_response_handler (void *cls, memcpy (&pm[1], data, data_len); GSF_local_client_transmit_ (lc, &pm->header); } -#if DEBUG_FS +#if DEBUG_FS_CLIENT GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Queued reply to query `%s' for local client\n", GNUNET_h2s (&prd->query), @@ -324,7 +324,7 @@ GSF_local_client_start_search_handler_ (struct GNUNET_SERVER_Client *client, sc = (msize - sizeof (struct SearchMessage)) / sizeof (GNUNET_HashCode); sm = (const struct SearchMessage*) message; type = ntohl (sm->type); -#if DEBUG_FS +#if DEBUG_FS_CLIENT GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received request for `%s' of type %u from local client\n", GNUNET_h2s (&sm->query), @@ -354,7 +354,7 @@ GSF_local_client_start_search_handler_ (struct GNUNET_SERVER_Client *client, } if (cr != NULL) { -#if DEBUG_FS +#if DEBUG_FS_CLIENT GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Have existing request, merging content-seen lists.\n"); #endif diff --git a/src/fs/gnunet-service-fs_pe.c b/src/fs/gnunet-service-fs_pe.c index 4dc9de1b8..309270e9b 100644 --- a/src/fs/gnunet-service-fs_pe.c +++ b/src/fs/gnunet-service-fs_pe.c @@ -281,7 +281,7 @@ schedule_peer_transmission (void *cls, } /* process from priority heap */ rp = GNUNET_CONTAINER_heap_peek (pp->priority_heap); -#if DEBUG_FS +#if DEBUG_FS > 1 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Executing query plan %p\n", rp); @@ -314,6 +314,7 @@ GSF_plan_add_ (struct GSF_ConnectedPeer *cp, struct GSF_PendingRequestData *prd; struct GSF_RequestPlan *rp; + GNUNET_assert (NULL != cp); GSF_connected_peer_get_identity_ (cp, &id); pp = GNUNET_CONTAINER_multihashmap_get (plans, &id.hashPubKey); diff --git a/src/fs/gnunet-service-fs_pr.c b/src/fs/gnunet-service-fs_pr.c index c1074e8bf..220a331d5 100644 --- a/src/fs/gnunet-service-fs_pr.c +++ b/src/fs/gnunet-service-fs_pr.c @@ -280,7 +280,7 @@ GSF_pending_request_create_ (enum GSF_PendingRequestOptions options, struct GSF_PendingRequest *pr; struct GSF_PendingRequest *dpr; -#if DEBUG_FS +#if DEBUG_FS > 1 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Creating request handle for `%s' of type %d\n", GNUNET_h2s (query), @@ -1065,7 +1065,7 @@ process_local_reply (void *cls, } if (NULL == key) { -#if DEBUG_FS +#if DEBUG_FS > 1 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "No further local responses available.\n"); #endif @@ -1087,7 +1087,7 @@ process_local_reply (void *cls, #endif if (type == GNUNET_BLOCK_TYPE_FS_ONDEMAND) { -#if DEBUG_FS +#if DEBUG_FS > 1 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Found ONDEMAND block, performing on-demand encoding\n"); #endif -- 2.25.1