gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r9243 - GNUnet/src/applications/dv_dht/module


From: gnunet
Subject: [GNUnet-SVN] r9243 - GNUnet/src/applications/dv_dht/module
Date: Thu, 22 Oct 2009 18:59:20 -0600

Author: nevans
Date: 2009-10-22 18:59:20 -0600 (Thu, 22 Oct 2009)
New Revision: 9243

Modified:
   GNUnet/src/applications/dv_dht/module/routing.c
   GNUnet/src/applications/dv_dht/module/table.c
Log:
teeny tiny changes

Modified: GNUnet/src/applications/dv_dht/module/routing.c
===================================================================
--- GNUnet/src/applications/dv_dht/module/routing.c     2009-10-23 00:53:54 UTC 
(rev 9242)
+++ GNUnet/src/applications/dv_dht/module/routing.c     2009-10-23 00:59:20 UTC 
(rev 9243)
@@ -679,9 +679,11 @@
   /*if (hops > 2 * diameter) */
   if (hops > 2 * diameter)
     {
-      fprintf (stderr,
-               "hops (%d) > 2 * diameter (%d) so failing (diameter %d)\n",
-               hops, 2 * diameter, diameter);
+      GNUNET_GE_LOG (coreAPI->ectx,
+                     GNUNET_GE_WARNING | GNUNET_GE_ADMIN | GNUNET_GE_USER |
+                     GNUNET_GE_BULK,
+                     "hops (%d) > 2 * diameter (%d) so failing (diameter 
%d)\n",
+                     hops, 2 * diameter, diameter);
       return GNUNET_SYSERR;
     }
   GNUNET_mutex_lock (lock);
@@ -887,7 +889,9 @@
   total =
     dstore->get (&get->key, ntohl (get->type), &route_result,
                  (void *) &queryuid);
-  fprintf(stderr, "Found %d local results for query %s, type %d\n", total, 
&enc, ntohl(get->type));
+  GNUNET_GE_LOG (coreAPI->ectx,
+                 GNUNET_GE_WARNING | GNUNET_GE_ADMIN | GNUNET_GE_USER |
+                 GNUNET_GE_BULK, "Found %d local results for query %s, type 
%d\n", total, (char *)&enc, ntohl(get->type));
 #else
   total = dstore->get (&get->key, ntohl (get->type), &route_result, NULL);
 #endif
@@ -1208,9 +1212,13 @@
                    (const char *) &put[1]);
 #if DEBUG_ROUTING
       if (ret != GNUNET_OK)
-       fprintf(stderr, "Caching data failed!\n");
+        GNUNET_GE_LOG (coreAPI->ectx,
+                       GNUNET_GE_WARNING | GNUNET_GE_ADMIN | GNUNET_GE_USER |
+                       GNUNET_GE_BULK, "Caching data failed!\n");
       else
-       fprintf(stderr, "Data inserted key: %s, type %d\n", &enc, 
ntohl(put->type));
+        GNUNET_GE_LOG (coreAPI->ectx,
+                       GNUNET_GE_WARNING | GNUNET_GE_ADMIN | GNUNET_GE_USER |
+                       GNUNET_GE_BULK, "Data inserted key: %s, type %d\n", 
(char *)&enc, ntohl(put->type));
 
 #endif
     }

Modified: GNUnet/src/applications/dv_dht/module/table.c
===================================================================
--- GNUnet/src/applications/dv_dht/module/table.c       2009-10-23 00:53:54 UTC 
(rev 9242)
+++ GNUnet/src/applications/dv_dht/module/table.c       2009-10-23 00:59:20 UTC 
(rev 9243)
@@ -651,6 +651,7 @@
   if (&closest == NULL)
     return GNUNET_SYSERR;
 
+#if DEBUG_TABLE
   GNUNET_GE_LOG (coreAPI->ectx,
                  GNUNET_GE_WARNING | GNUNET_GE_ADMIN | GNUNET_GE_USER |
                  GNUNET_GE_BULK, "closest peer\n");
@@ -670,6 +671,7 @@
                  inverse_distance (target, &closest.hashPubKey),
                  inverse_distance (target,
                                    &coreAPI->my_identity->hashPubKey));
+#endif
   if (inverse_distance (target, &coreAPI->my_identity->hashPubKey) >=
       inverse_distance (target, &closest.hashPubKey)
       && (inverse_distance (target, &coreAPI->my_identity->hashPubKey) > 0))





reply via email to

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