From 8e50a17e7ad86b3515503725e6470c347f79edf6 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 25 Oct 2018 10:25:01 +0200 Subject: allow any zone if request was for NULL --- src/namestore/namestore_api_monitor.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/namestore/namestore_api_monitor.c b/src/namestore/namestore_api_monitor.c index 2c4c4559d..457da0b90 100644 --- a/src/namestore/namestore_api_monitor.c +++ b/src/namestore/namestore_api_monitor.c @@ -129,6 +129,7 @@ static int check_result (void *cls, const struct RecordResultMessage *lrm) { + static struct GNUNET_CRYPTO_EcdsaPrivateKey zero; struct GNUNET_NAMESTORE_ZoneMonitor *zm = cls; size_t lrm_len; size_t exp_lrm_len; @@ -139,9 +140,12 @@ check_result (void *cls, const char *rd_ser_tmp; (void) cls; - if (0 != memcmp (&lrm->private_key, - &zm->zone, - sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey))) + if ( (0 != memcmp (&lrm->private_key, + &zm->zone, + sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey))) && + (0 != memcmp (&zero, + &zm->zone, + sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey))) ) { GNUNET_break (0); return GNUNET_SYSERR; -- cgit v1.2.3