nicer debugs
authorChristian Grothoff <christian@grothoff.org>
Wed, 25 May 2011 10:23:29 +0000 (10:23 +0000)
committerChristian Grothoff <christian@grothoff.org>
Wed, 25 May 2011 10:23:29 +0000 (10:23 +0000)
src/fs/gnunet-service-fs.c
src/fs/gnunet-service-fs_lc.c
src/fs/gnunet-service-fs_pe.c
src/fs/gnunet-service-fs_pr.c

index 96ed39c9406c82a2905b4bd3942a43bcf7f3b64e..87cdd832293eec0b7fec02030ef4ff6f6fce86d4 100644 (file)
@@ -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),
index 11b26c452e020bf33f2d6ec6d87fa24f80f5332d..fe22bd0993263cc1eb503e5f69089c0deeae79dd 100644 (file)
@@ -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
index 4dc9de1b8df2cfedfdafed1c21cc458c9b25523c..309270e9b769605e4b0b4768e427ff16f177124c 100644 (file)
@@ -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);
index c1074e8bf6cc96962c599dacd0a394ab131dc538..220a331d55083d3b4f52459d4badc7a1a3040b18 100644 (file)
@@ -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