From: Christian Grothoff Date: Tue, 9 Oct 2018 13:11:06 +0000 (+0200) Subject: when zone does not match, do not run through the loop anyway X-Git-Tag: v0.11.0~238^2~84^2~5 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=097a0cfa961e33da64b459b85e604bc3f72ab930;p=oweals%2Fgnunet.git when zone does not match, do not run through the loop anyway --- 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) {