summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-10-09 15:11:06 +0200
committerChristian Grothoff <christian@grothoff.org>2018-10-09 15:11:06 +0200
commit097a0cfa961e33da64b459b85e604bc3f72ab930 (patch)
tree968a10e85497ea2eaf8c127b3eb70abdbb1abe5a
parentb7ef945fa5c5926e6eb457a472115263c0170f8f (diff)
when zone does not match, do not run through the loop anyway
-rw-r--r--src/namestore/gnunet-service-namestore.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c
index 2d6020552..e6d82e3f4 100644
--- a/src/namestore/gnunet-service-namestore.c
+++ b/src/namestore/gnunet-service-namestore.c
@@ -920,7 +920,10 @@ continue_store_activity (struct StoreActivity *sa)
(0 != memcmp (&zm->zone,
&zero,
sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey))) )
- sa->zm_pos = zm->next; /* not interesting to this monitor */
+ {
+ sa->zm_pos = zm->next; /* not interesting to this monitor */
+ continue;
+ }
if (zm->limit == zm->iteration_cnt)
{
zm->sa_waiting = GNUNET_YES;
@@ -1977,6 +1980,16 @@ monitor_iterate_cb (void *cls,
{
struct ZoneMonitor *zm = cls;
+ if ( (0 != memcmp (&zone_key,
+ &zm->zone,
+ sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey))) &&
+ (0 != memcmp (&zm->zone,
+ &zero,
+ sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey))) )
+ {
+ GNUNET_break (0);
+ return;
+ }
zm->seq = seq;
if (NULL == name)
{