read put and get replication from config when testing
authorNathan S. Evans <evans@in.tum.de>
Thu, 11 Nov 2010 11:53:23 +0000 (11:53 +0000)
committerNathan S. Evans <evans@in.tum.de>
Thu, 11 Nov 2010 11:53:23 +0000 (11:53 +0000)
src/dht/gnunet-dht-driver.c

index 87836c3f52d4949e49264e777e6206e6f10dca82..0d72caf3bdce23a2eb66e75e586cf64479c1a1cb 100644 (file)
@@ -2790,11 +2790,21 @@ run (void *cls,
                                              &num_puts))
     num_puts = num_peers;
 
+  if (GNUNET_SYSERR ==
+      GNUNET_CONFIGURATION_get_value_number (cfg, "dht_testing", "put_replication",
+                                             &put_replication))
+    put_replication = DEFAULT_PUT_REPLICATION;
+
   if (GNUNET_SYSERR ==
       GNUNET_CONFIGURATION_get_value_number (cfg, "dht_testing", "num_gets",
                                              &num_gets))
     num_gets = num_peers;
 
+  if (GNUNET_SYSERR ==
+        GNUNET_CONFIGURATION_get_value_number (cfg, "dht_testing", "get_replication",
+                                               &get_replication))
+      get_replication = DEFAULT_GET_REPLICATION;
+
   if (GNUNET_OK ==
         GNUNET_CONFIGURATION_get_value_number (cfg, "dht_testing", "find_peer_delay",
                                                &temp_config_number))