gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r12916 - gnunet/src/dht
Date: Wed, 8 Sep 2010 10:57:11 +0200

Author: nevans
Date: 2010-09-08 10:57:11 +0200 (Wed, 08 Sep 2010)
New Revision: 12916

Modified:
   gnunet/src/dht/gnunet-service-dht.c
Log:
committing so line numbers match

Modified: gnunet/src/dht/gnunet-service-dht.c
===================================================================
--- gnunet/src/dht/gnunet-service-dht.c 2010-09-08 08:00:05 UTC (rev 12915)
+++ gnunet/src/dht/gnunet-service-dht.c 2010-09-08 08:57:11 UTC (rev 12916)
@@ -671,6 +671,16 @@
  */
 static unsigned int do_find_peer;
 
+/**
+ * Once we have stored an item in the DHT, refresh it
+ * according to our republish interval.
+ */
+static unsigned int do_republish;
+
+/**
+ * Use the "real" distance metric when selecting the
+ * next routing hop.  Can be less accurate.
+ */
 static unsigned int use_real_distance;
 
 /**
@@ -2401,7 +2411,7 @@
                                   (char *) &put_msg[1], put_type,
                                   
GNUNET_TIME_absolute_ntoh(put_msg->expiration));
 
-      if (ret == GNUNET_YES)
+      if ((ret == GNUNET_YES) && (do_republish == GNUNET_YES))
         {
           put_context = GNUNET_malloc(sizeof(struct RepublishContext));
           memcpy(&put_context->key, &message_context->key, 
sizeof(GNUNET_HashCode));
@@ -4095,6 +4105,11 @@
       malicious_dropper = GNUNET_YES;
     }
 
+  if (GNUNET_YES ==
+        GNUNET_CONFIGURATION_get_value_yesno(cfg, "dht",
+                                             "republish"))
+    do_republish = GNUNET_NO;
+
   if (GNUNET_NO ==
         GNUNET_CONFIGURATION_get_value_yesno(cfg, "dht",
                                              "do_find_peer"))




reply via email to

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