gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r33960 - gnunet/src/dht
Date: Mon, 14 Jul 2014 14:03:35 +0200

Author: supriti
Date: 2014-07-14 14:03:35 +0200 (Mon, 14 Jul 2014)
New Revision: 33960

Modified:
   gnunet/src/dht/gnunet_dht_profiler.c
Log:
Use correct key while doing GET.  Wait for all PUT and GET requests to complete.


Modified: gnunet/src/dht/gnunet_dht_profiler.c
===================================================================
--- gnunet/src/dht/gnunet_dht_profiler.c        2014-07-12 21:19:49 UTC (rev 
33959)
+++ gnunet/src/dht/gnunet_dht_profiler.c        2014-07-14 12:03:35 UTC (rev 
33960)
@@ -308,19 +308,7 @@
   struct ActiveContext *get_ac = ac->get_ac;
 
   /* Check the keys of put and get match or not. */
-  if (0 == memcmp (key, &get_ac->hash, sizeof (struct GNUNET_HashCode)))
-  {
-    if (get_ac->put_data_size != size)
-    {
-      DEBUG ("Found a GET with incorrect data length (this may happen, but 
very unlikely)\n");
-      return;
-    }
-    if (0 != memcmp (data, get_ac->put_data, size))
-    {
-      DEBUG ("Found a GET with incorrect data (this may happen, but very 
unlikely)\n");
-      return;
-    }
-  }
+  GNUNET_assert (0 == memcmp (key, &get_ac->hash, sizeof (struct 
GNUNET_HashCode)));
   /* we found the data we are looking for */
   DEBUG ("We found a GET request; %u remaining\n", n_gets - (n_gets_fail + 
n_gets_ok));
   n_gets_ok++;
@@ -331,7 +319,7 @@
   ac->delay_task = GNUNET_SCHEDULER_NO_TASK;
 
   /* Summarize if profiling is complete */
-  if (n_gets == n_gets_fail + n_gets_ok)
+  if (n_active == n_gets_fail + n_gets_ok)
     summarize ();
 }
 
@@ -362,7 +350,7 @@
   ac->get_ac = get_ac;
   ac->dht_get = GNUNET_DHT_get_start (ac->dht,
                                       GNUNET_BLOCK_TYPE_TEST,
-                                      &ac->hash,
+                                      &get_ac->hash,
                                       1, /* replication level */
                                       GNUNET_DHT_RO_NONE,
                                       NULL, 0, /* extended query and size */




reply via email to

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