gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r19843 - gnunet/src/dht
Date: Sat, 18 Feb 2012 19:57:46 +0100

Author: grothoff
Date: 2012-02-18 19:57:46 +0100 (Sat, 18 Feb 2012)
New Revision: 19843

Modified:
   gnunet/src/dht/dht_api.c
   gnunet/src/dht/test_dht_api.c
Log:
-die ifdefs, die

Modified: gnunet/src/dht/dht_api.c
===================================================================
--- gnunet/src/dht/dht_api.c    2012-02-18 18:56:16 UTC (rev 19842)
+++ gnunet/src/dht/dht_api.c    2012-02-18 18:57:46 UTC (rev 19843)
@@ -34,8 +34,6 @@
 #include "gnunet_dht_service.h"
 #include "dht.h"
 
-#define DEBUG_DHT_API GNUNET_EXTRA_LOGGING
-
 #define LOG(kind,...) GNUNET_log_from (kind, "dht-api",__VA_ARGS__)
 
 /**
@@ -303,11 +301,9 @@
 
   if (GNUNET_NO == rh->message->in_pending_queue)
   {
-#if DEBUG_DHT
     LOG (GNUNET_ERROR_TYPE_DEBUG,
          "Retransmitting request related to %s to DHT %p\n", GNUNET_h2s (key),
          handle);
-#endif
     GNUNET_CONTAINER_DLL_insert (handle->pending_head, handle->pending_tail,
                                  rh->message);
     rh->message->in_pending_queue = GNUNET_YES;
@@ -335,9 +331,7 @@
 {
   struct GNUNET_DHT_Handle *handle = cls;
 
-#if DEBUG_DHT
   LOG (GNUNET_ERROR_TYPE_DEBUG, "Reconnecting with DHT %p\n", handle);
-#endif
   handle->reconnect_task = GNUNET_SCHEDULER_NO_TASK;
   if (handle->retry_time.rel_value < GNUNET_CONSTANTS_SERVICE_RETRY.rel_value)
     handle->retry_time = GNUNET_CONSTANTS_SERVICE_RETRY;
@@ -348,9 +342,7 @@
   handle->reconnect_task = GNUNET_SCHEDULER_NO_TASK;
   if (GNUNET_YES != try_connect (handle))
   {
-#if DEBUG_DHT
     LOG (GNUNET_ERROR_TYPE_DEBUG, "dht reconnect failed(!)\n");
-#endif
     return;
   }
   GNUNET_CONTAINER_multihashmap_iterate (handle->active_requests,
@@ -435,11 +427,9 @@
 
   handle->th = NULL;
   if (buf == NULL)
-  {
-#if DEBUG_DHT
+  {    
     LOG (GNUNET_ERROR_TYPE_DEBUG,
          "Transmission to DHT service failed!  Reconnecting!\n");
-#endif
     do_disconnect (handle);
     return 0;
   }
@@ -470,15 +460,11 @@
   if (GNUNET_YES == head->free_on_send)
     GNUNET_free (head);
   process_pending_messages (handle);
-#if DEBUG_DHT
   LOG (GNUNET_ERROR_TYPE_DEBUG,
        "Forwarded request of %u bytes to DHT service\n", (unsigned int) tsize);
-#endif
   if (GNUNET_NO == handle->in_receive)
   {
-#if DEBUG_DHT
     LOG (GNUNET_ERROR_TYPE_DEBUG, "Starting to process replies from DHT\n");
-#endif
     handle->in_receive = GNUNET_YES;
     GNUNET_CLIENT_receive (handle->client, &service_message_handler, handle,
                            GNUNET_TIME_UNIT_FOREVER_REL);
@@ -514,11 +500,9 @@
   if (dht_msg->unique_id != get_handle->unique_id)
   {
     /* UID mismatch */
-#if DEBUG_DHT
     LOG (GNUNET_ERROR_TYPE_DEBUG,
          "Ignoring reply for %s: UID mismatch: %llu/%llu\n", GNUNET_h2s (key),
          dht_msg->unique_id, get_handle->unique_id);
-#endif
     return GNUNET_YES;
   }
   msize = ntohs (dht_msg->header.size);
@@ -537,10 +521,8 @@
     return GNUNET_NO;
   }
   data_length = msize - meta_length;
-#if DEBUG_DHT
   LOG (GNUNET_ERROR_TYPE_DEBUG, "Giving %u byte reply for %s to application\n",
        (unsigned int) data_length, GNUNET_h2s (key));
-#endif
   put_path = (const struct GNUNET_PeerIdentity *) &dht_msg[1];
   get_path = &put_path[put_path_length];
   data = &get_path[get_path_length];
@@ -623,10 +605,8 @@
 
   if (msg == NULL)
   {
-#if DEBUG_DHT
     LOG (GNUNET_ERROR_TYPE_DEBUG,
          "Error receiving data from DHT service, reconnecting\n");
-#endif
     do_disconnect (handle);
     return;
   }
@@ -649,10 +629,8 @@
     return;
   }
   dht_msg = (const struct GNUNET_DHT_ClientResultMessage *) msg;
-#if DEBUG_DHT
   LOG (GNUNET_ERROR_TYPE_DEBUG, "Received reply for `%s' from DHT service 
%p\n",
        GNUNET_h2s (&dht_msg->key), handle);
-#endif
   GNUNET_CONTAINER_multihashmap_get_multiple (handle->active_requests,
                                               &dht_msg->key, &process_reply,
                                               (void *) dht_msg);
@@ -856,10 +834,8 @@
     GNUNET_break (0);
     return NULL;
   }
-#if DEBUG_DHT
   LOG (GNUNET_ERROR_TYPE_DEBUG, "Sending query for %s to DHT %p\n",
        GNUNET_h2s (key), handle);
-#endif
   pending = GNUNET_malloc (sizeof (struct PendingMessage) + msize);
   get_msg = (struct GNUNET_DHT_ClientGetMessage *) &pending[1];
   pending->msg = &get_msg->header;
@@ -905,10 +881,8 @@
   handle = get_handle->message->handle;
   get_msg =
       (const struct GNUNET_DHT_ClientGetMessage *) get_handle->message->msg;
-#if DEBUG_DHT
   LOG (GNUNET_ERROR_TYPE_DEBUG, "Sending STOP for %s to DHT via %p\n",
        GNUNET_h2s (&get_msg->key), handle);
-#endif
   /* generate STOP */
   pending =
       GNUNET_malloc (sizeof (struct PendingMessage) +

Modified: gnunet/src/dht/test_dht_api.c
===================================================================
--- gnunet/src/dht/test_dht_api.c       2012-02-18 18:56:16 UTC (rev 19842)
+++ gnunet/src/dht/test_dht_api.c       2012-02-18 18:57:46 UTC (rev 19843)
@@ -34,9 +34,9 @@
 #include "gnunet_dht_service.h"
 #include "gnunet_hello_lib.h"
 
-#define VERBOSE GNUNET_EXTRA_LOGGING
+#define VERBOSE GNUNET_NO
 
-#define VERBOSE_ARM GNUNET_EXTRA_LOGGING
+#define VERBOSE_ARM GNUNET_NO
 
 #define START_ARM GNUNET_YES
 




reply via email to

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