From 09c5ef053f8c990d32babf9b30c81c39abd5a45d Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Mon, 4 Nov 2013 13:54:48 +0000 Subject: [PATCH] fix for lookup --- src/namestore/gnunet-namestore.c | 4 ++++ src/namestore/gnunet-service-namestore.c | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c index bbec0f3cd..205e65f82 100644 --- a/src/namestore/gnunet-namestore.c +++ b/src/namestore/gnunet-namestore.c @@ -419,6 +419,10 @@ get_existing_record (void *cls, GNUNET_break (0); return; } + + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received %u records for name `%s'\n", + rd_count, rec_name); + memset (rdn, 0, sizeof (struct GNUNET_GNSRECORD_Data)); memcpy (&rdn[1], rd, rd_count * sizeof (struct GNUNET_GNSRECORD_Data)); /* FIXME: should add some logic to overwrite records if there diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c index 2353eadec..f793c50d7 100644 --- a/src/namestore/gnunet-service-namestore.c +++ b/src/namestore/gnunet-service-namestore.c @@ -656,6 +656,12 @@ handle_record_lookup (void *cls, "Received `%s' message for name `%s'\n", "NAMESTORE_RECORD_LOOKUP", name_tmp); + if (NULL == (client_lookup (client))) + { + GNUNET_break (0); + GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); + return; + } rlc.label = name_tmp; rlc.found = GNUNET_NO; -- 2.25.1