gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r17121 - gnunet/src/dht
Date: Fri, 30 Sep 2011 01:07:28 +0200

Author: grothoff
Date: 2011-09-30 01:07:27 +0200 (Fri, 30 Sep 2011)
New Revision: 17121

Modified:
   gnunet/src/dht/test_dht_multipeer.c
Log:
use unique keys for each peer pair

Modified: gnunet/src/dht/test_dht_multipeer.c
===================================================================
--- gnunet/src/dht/test_dht_multipeer.c 2011-09-29 21:53:01 UTC (rev 17120)
+++ gnunet/src/dht/test_dht_multipeer.c 2011-09-29 23:07:27 UTC (rev 17121)
@@ -498,7 +498,7 @@
   GNUNET_SCHEDULER_cancel (test_put->task);
   test_put->task =
       GNUNET_SCHEDULER_add_now (&put_disconnect_task, test_put);
-  if (puts_completed != num_peers)
+  if (puts_completed != num_peers * num_peers)
     return;
 
   GNUNET_assert (outstanding_puts == 0);
@@ -509,7 +509,7 @@
     for (j = 0; j < num_peers; j++)
       {
        test_get = GNUNET_malloc (sizeof (struct TestGetContext));
-       test_get->uid = i;
+       test_get->uid = i + j*num_peers;
        test_get->daemon = GNUNET_TESTING_daemon_get (pg, j);
        GNUNET_CONTAINER_DLL_insert (all_gets_head,
                                     all_gets_tail,
@@ -590,11 +590,11 @@
   fprintf (stderr, 
           "Issuing %llu PUTs (one per peer)\n", 
           num_peers);
-  for (i = 0; i < num_peers; i++)
+  for (i = 0; i < num_peers * num_peers; i++)
   {
     test_put = GNUNET_malloc (sizeof (struct TestPutContext));
     test_put->uid = i;
-    test_put->daemon = GNUNET_TESTING_daemon_get (pg, i);    
+    test_put->daemon = GNUNET_TESTING_daemon_get (pg, i % num_peers);    
     test_put->task = GNUNET_SCHEDULER_add_now (&do_put, test_put);
     GNUNET_CONTAINER_DLL_insert (all_puts_head,
                                 all_puts_tail,




reply via email to

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