gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r17732 - gnunet/src/dht


From: gnunet
Subject: [GNUnet-SVN] r17732 - gnunet/src/dht
Date: Mon, 24 Oct 2011 18:52:09 +0200

Author: grothoff
Date: 2011-10-24 18:52:09 +0200 (Mon, 24 Oct 2011)
New Revision: 17732

Modified:
   gnunet/src/dht/gnunet-service-dht_clients.c
Log:
log local operations

Modified: gnunet/src/dht/gnunet-service-dht_clients.c
===================================================================
--- gnunet/src/dht/gnunet-service-dht_clients.c 2011-10-24 16:45:37 UTC (rev 
17731)
+++ gnunet/src/dht/gnunet-service-dht_clients.c 2011-10-24 16:52:09 UTC (rev 
17732)
@@ -248,6 +248,10 @@
 
   if (record->client != client)
     return GNUNET_YES;
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+             "Removing client %p's record for key %s\n",
+             client,
+             GNUNET_h2s (key));
   GNUNET_assert (GNUNET_YES ==
                 GNUNET_CONTAINER_multihashmap_remove (forward_map,
                                                       key, record));
@@ -276,6 +280,9 @@
   struct ClientList *pos;
   struct PendingMessage *reply;
 
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+             "Local client %p disconnects\n",
+             client);
   pos = find_active_client (client);
   GNUNET_CONTAINER_DLL_remove (client_head,
                               client_tail,
@@ -473,8 +480,9 @@
                             gettext_noop ("# GET requests received from 
clients"), 1,
                             GNUNET_NO);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-             "Received request for %s from local client\n",
-             GNUNET_h2s (&get->key)); 
+             "Received request for %s from local client %p\n",
+             GNUNET_h2s (&get->key),
+             client); 
   cqr = GNUNET_malloc (sizeof (struct ClientQueryRecord) + xquery_size);
   cqr->key = get->key;
   cqr->client = find_active_client (client);
@@ -538,6 +546,10 @@
 
   if (record->unique_id != ctx->unique_id)
     return GNUNET_YES;
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+             "Removing client %p's record for key %s (by unique id)\n",
+             ctx->client,
+             GNUNET_h2s (key));
   return remove_client_records (ctx->client, key, record);
 }
 
@@ -562,6 +574,10 @@
   GNUNET_STATISTICS_update (GDS_stats,
                             gettext_noop ("# GET STOP requests received from 
clients"), 1,
                             GNUNET_NO);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+             "Client %p stopped request for key %s\n",
+             client,
+             GNUNET_h2s (&dht_stop_msg->key));
   ctx.client = find_active_client (client);
   ctx.unique_id = dht_stop_msg->unique_id;
   GNUNET_CONTAINER_multihashmap_get_multiple (forward_map,
@@ -718,6 +734,9 @@
   if ( (record->type != GNUNET_BLOCK_TYPE_ANY) &&
        (record->type != frc->type) )
     {
+      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                 "Record type missmatch, not passing request for key %s to 
local client\n",
+                 GNUNET_h2s (key));
       GNUNET_STATISTICS_update (GDS_stats,
                                gettext_noop ("# Key match, type mismatches in 
REPLY to CLIENT"), 1,
                                GNUNET_NO);
@@ -731,6 +750,9 @@
                     &ch,
                     sizeof (GNUNET_HashCode)))
       {
+       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                   "Duplicate reply, not passing request for key %s to local 
client\n",
+                   GNUNET_h2s (key));
        GNUNET_STATISTICS_update (GDS_stats,
                                  gettext_noop ("# Duplicate REPLIES to CLIENT 
request dropped"), 1,
                                  GNUNET_NO);
@@ -744,6 +766,10 @@
                           record->xquery_size, 
                           frc->data,
                           frc->data_size);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+             "Evaluation result is %d for key %s for local client's query\n",
+             (int) eval,
+             GNUNET_h2s (key));
   switch (eval)
   {
   case GNUNET_BLOCK_EVALUATION_OK_LAST:
@@ -797,6 +823,10 @@
                             GNUNET_NO);
   reply = (struct GNUNET_DHT_ClientResultMessage*) &pm[1];  
   reply->unique_id = record->unique_id;
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+             "Queueing reply to query %s for peer %p\n",
+             GNUNET_h2s (key),
+             record->client->client_handle);
   add_pending_message (record->client, pm);
   if (GNUNET_YES == do_free)
     remove_client_records (record->client, key, record);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]