more logging for insane bug 1829
authorChristian Grothoff <christian@grothoff.org>
Mon, 24 Oct 2011 21:46:24 +0000 (21:46 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 24 Oct 2011 21:46:24 +0000 (21:46 +0000)
src/dht/gnunet-service-dht_clients.c

index 60216bcc996cc63de97aef1418f4f808dd458bb4..b0641d6b2e93eb909c6c1a10596ef6f13e5c473a 100644 (file)
@@ -642,6 +642,11 @@ send_reply_to_client (void *cls, size_t size, void *buf)
     off += msize;
   }
   process_pending_messages (client);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+             "Transmitted %u/%u bytes to client %p\n",
+             (unsigned int) off,
+             (unsigned int) size,
+             client->client_handle);
   return off;
 }
 
@@ -655,7 +660,20 @@ static void
 process_pending_messages (struct ClientList *client)
 {
   if ((client->pending_head == NULL) || (client->transmit_handle != NULL))
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+               "Not asking for transmission to %p now: %s\n",
+               client->client_handle,
+               client->pending_head == NULL 
+               ? "no more messages"
+               : "request already pending");
     return;
+  }
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+             "Asking for transmission of %u bytes to client %p\n",
+             ntohs (client->pending_head->
+                    msg->size),
+             client->client_handle);
   client->transmit_handle =
       GNUNET_SERVER_notify_transmit_ready (client->client_handle,
                                            ntohs (client->pending_head->