summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-10-25 10:25:01 +0200
committerChristian Grothoff <christian@grothoff.org>2018-10-25 10:58:10 +0200
commit8e50a17e7ad86b3515503725e6470c347f79edf6 (patch)
tree2d56c203430218f0285a2e6506aa4e57ef0a52a3 /src
parentbebdf68c0680860c619cb95c16d014f27c55de14 (diff)
allow any zone if request was for NULL
Diffstat (limited to 'src')
-rw-r--r--src/namestore/namestore_api_monitor.c10
1 files 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;