diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-10-09 15:11:06 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-10-09 15:11:06 +0200 |
commit | 097a0cfa961e33da64b459b85e604bc3f72ab930 (patch) | |
tree | 968a10e85497ea2eaf8c127b3eb70abdbb1abe5a /src | |
parent | b7ef945fa5c5926e6eb457a472115263c0170f8f (diff) | |
download | gnunet-097a0cfa961e33da64b459b85e604bc3f72ab930.tar.gz gnunet-097a0cfa961e33da64b459b85e604bc3f72ab930.zip |
when zone does not match, do not run through the loop anyway
Diffstat (limited to 'src')
-rw-r--r-- | src/namestore/gnunet-service-namestore.c | 15 |
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) | |||
920 | (0 != memcmp (&zm->zone, | 920 | (0 != memcmp (&zm->zone, |
921 | &zero, | 921 | &zero, |
922 | sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey))) ) | 922 | sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey))) ) |
923 | sa->zm_pos = zm->next; /* not interesting to this monitor */ | 923 | { |
924 | sa->zm_pos = zm->next; /* not interesting to this monitor */ | ||
925 | continue; | ||
926 | } | ||
924 | if (zm->limit == zm->iteration_cnt) | 927 | if (zm->limit == zm->iteration_cnt) |
925 | { | 928 | { |
926 | zm->sa_waiting = GNUNET_YES; | 929 | zm->sa_waiting = GNUNET_YES; |
@@ -1977,6 +1980,16 @@ monitor_iterate_cb (void *cls, | |||
1977 | { | 1980 | { |
1978 | struct ZoneMonitor *zm = cls; | 1981 | struct ZoneMonitor *zm = cls; |
1979 | 1982 | ||
1983 | if ( (0 != memcmp (&zone_key, | ||
1984 | &zm->zone, | ||
1985 | sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey))) && | ||
1986 | (0 != memcmp (&zm->zone, | ||
1987 | &zero, | ||
1988 | sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey))) ) | ||
1989 | { | ||
1990 | GNUNET_break (0); | ||
1991 | return; | ||
1992 | } | ||
1980 | zm->seq = seq; | 1993 | zm->seq = seq; |
1981 | if (NULL == name) | 1994 | if (NULL == name) |
1982 | { | 1995 | { |