From 370d0332d12394caeeaeafcfad406c12d11121fb Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 23 Mar 2015 15:36:01 +0000 Subject: [PATCH] return GNS2DNS records if explicitly requested --- src/gns/gnunet-service-gns_resolver.c | 5 +++++ src/gns/plugin_gnsrecord_gns.c | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c index 580233da3..de9e87f24 100644 --- a/src/gns/gnunet-service-gns_resolver.c +++ b/src/gns/gnunet-service-gns_resolver.c @@ -1710,6 +1710,11 @@ handle_gns_resolution_result (void *cls, case GNUNET_GNSRECORD_TYPE_GNS2DNS: { /* delegation to DNS */ + if (GNUNET_GNSRECORD_TYPE_GNS2DNS == rh->record_type) + { + rd_off++; + break; /* do not follow to DNS, we wanted the GNS2DNS record! */ + } GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Found GNS2DNS record, delegating to DNS!\n"); goto do_recurse; diff --git a/src/gns/plugin_gnsrecord_gns.c b/src/gns/plugin_gnsrecord_gns.c index 99eaa6cf9..b2bca8810 100644 --- a/src/gns/plugin_gnsrecord_gns.c +++ b/src/gns/plugin_gnsrecord_gns.c @@ -341,8 +341,9 @@ gns_typename_to_number (void *cls, unsigned int i; i=0; - while ( (gns_name_map[i].name != NULL) && - (0 != strcasecmp (gns_typename, gns_name_map[i].name)) ) + while ( (NULL != gns_name_map[i].name) && + (0 != strcasecmp (gns_typename, + gns_name_map[i].name)) ) i++; return gns_name_map[i].number; } @@ -362,7 +363,7 @@ gns_number_to_typename (void *cls, unsigned int i; i=0; - while ( (gns_name_map[i].name != NULL) && + while ( (NULL != gns_name_map[i].name) && (type != gns_name_map[i].number) ) i++; return gns_name_map[i].name; -- 2.25.1