diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-03-23 15:36:01 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-03-23 15:36:01 +0000 |
commit | 370d0332d12394caeeaeafcfad406c12d11121fb (patch) | |
tree | 946ea9298b3f8b63fa0747fc1498706fbaccccfb /src/gns | |
parent | e1021601b1c0f17ab7ffd51badecc247902e0e2a (diff) | |
download | gnunet-370d0332d12394caeeaeafcfad406c12d11121fb.tar.gz gnunet-370d0332d12394caeeaeafcfad406c12d11121fb.zip |
return GNS2DNS records if explicitly requested
Diffstat (limited to 'src/gns')
-rw-r--r-- | src/gns/gnunet-service-gns_resolver.c | 5 | ||||
-rw-r--r-- | 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, | |||
1710 | case GNUNET_GNSRECORD_TYPE_GNS2DNS: | 1710 | case GNUNET_GNSRECORD_TYPE_GNS2DNS: |
1711 | { | 1711 | { |
1712 | /* delegation to DNS */ | 1712 | /* delegation to DNS */ |
1713 | if (GNUNET_GNSRECORD_TYPE_GNS2DNS == rh->record_type) | ||
1714 | { | ||
1715 | rd_off++; | ||
1716 | break; /* do not follow to DNS, we wanted the GNS2DNS record! */ | ||
1717 | } | ||
1713 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1718 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1714 | "Found GNS2DNS record, delegating to DNS!\n"); | 1719 | "Found GNS2DNS record, delegating to DNS!\n"); |
1715 | goto do_recurse; | 1720 | 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, | |||
341 | unsigned int i; | 341 | unsigned int i; |
342 | 342 | ||
343 | i=0; | 343 | i=0; |
344 | while ( (gns_name_map[i].name != NULL) && | 344 | while ( (NULL != gns_name_map[i].name) && |
345 | (0 != strcasecmp (gns_typename, gns_name_map[i].name)) ) | 345 | (0 != strcasecmp (gns_typename, |
346 | gns_name_map[i].name)) ) | ||
346 | i++; | 347 | i++; |
347 | return gns_name_map[i].number; | 348 | return gns_name_map[i].number; |
348 | } | 349 | } |
@@ -362,7 +363,7 @@ gns_number_to_typename (void *cls, | |||
362 | unsigned int i; | 363 | unsigned int i; |
363 | 364 | ||
364 | i=0; | 365 | i=0; |
365 | while ( (gns_name_map[i].name != NULL) && | 366 | while ( (NULL != gns_name_map[i].name) && |
366 | (type != gns_name_map[i].number) ) | 367 | (type != gns_name_map[i].number) ) |
367 | i++; | 368 | i++; |
368 | return gns_name_map[i].name; | 369 | return gns_name_map[i].name; |