From: Martin Schanzenbach Date: Mon, 2 Jul 2012 13:43:56 +0000 (+0000) Subject: -fix non GNS TLD lookup X-Git-Tag: initial-import-from-subversion-38251~12694 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f5ace9e5e65381e94c50a57df200503894fda2a0;p=oweals%2Fgnunet.git -fix non GNS TLD lookup --- 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; + } } /**