From f5ace9e5e65381e94c50a57df200503894fda2a0 Mon Sep 17 00:00:00 2001 From: Martin Schanzenbach Date: Mon, 2 Jul 2012 13:43:56 +0000 Subject: [PATCH] -fix non GNS TLD lookup --- src/gns/gnunet-service-gns_resolver.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c index 653f9190d..1f103f421 100644 --- a/src/gns/gnunet-service-gns_resolver.c +++ b/src/gns/gnunet-service-gns_resolver.c @@ -3630,7 +3630,7 @@ gns_resolver_lookup_record (struct GNUNET_CRYPTO_ShortHashCode zone, } } - else + else if (is_gnunet_tld (name) == GNUNET_YES) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "TLD is gnunet\n"); @@ -3642,6 +3642,17 @@ gns_resolver_lookup_record (struct GNUNET_CRYPTO_ShortHashCode zone, memcpy (rh->name, name, strlen(name)-strlen(GNUNET_GNS_TLD) - 1); } + else + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Cannot handle this TLD %s\n", string_hash); + + GNUNET_CONTAINER_DLL_remove (rlh_head, rlh_tail, rh); + GNUNET_free (rh); + GNUNET_free (rlh); + proc (cls, 0, NULL); + return; + } } /** -- 2.25.1