nicer logging
authorChristian Grothoff <christian@grothoff.org>
Thu, 27 May 2010 12:14:51 +0000 (12:14 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 27 May 2010 12:14:51 +0000 (12:14 +0000)
src/core/core_api.c
src/core/gnunet-service-core.c

index 1e17d0f5f931e049913341c532b49e8e40b1eb78..4af9aebfdba367bfb18149c2b41654f728e1dbb3 100644 (file)
@@ -430,8 +430,10 @@ main_notify_handler (void *cls, const struct GNUNET_MessageHeader *msg)
       em = (const struct GNUNET_MessageHeader *) &ntm[1];
 #if DEBUG_CORE
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                  "Received message of type %u from peer `%4s'\n",
-                  ntohs (em->type), GNUNET_i2s (&ntm->peer));
+                  "Received message of type %u and size %u from peer `%4s'\n",
+                  ntohs (em->type), 
+                 ntohs (em->size),
+                 GNUNET_i2s (&ntm->peer));
 #endif
       if ((GNUNET_NO == h->inbound_hdr_only) &&
           (msize != ntohs (em->size) + sizeof (struct NotifyTrafficMessage)))
index bb7a506cb1f0bc7bfbef6b262ecd7312c8913712..cdd2b857e0e3df0e79953ce2e69f101a53e48c4c 100644 (file)
@@ -3167,8 +3167,9 @@ deliver_message (struct Neighbour *sender,
   type = ntohs (m->type);
 #if DEBUG_CORE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-             "Received encapsulated message of type %u from `%4s'\n",
+             "Received encapsulated message of type %u and size %u from `%4s'\n",
              (unsigned int) type,
+             ntohs (m->size),
              GNUNET_i2s (&sender->peer));
 #endif
   GNUNET_snprintf (buf,
@@ -3602,7 +3603,7 @@ neighbour_quota_update (void *cls,
 
 #if DEBUG_CORE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-             "Neighbour quota update calculation running for peer `%4s'\n"
+             "Neighbour quota update calculation running for peer `%4s'\n",
              GNUNET_i2s (&n->peer));  
 #endif
   n->quota_update_task = GNUNET_SCHEDULER_NO_TASK;