aboutsummaryrefslogtreecommitdiff
path: root/src/gns/gns_tld_api.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-03-08 15:50:18 +0100
committerChristian Grothoff <christian@grothoff.org>2018-03-08 15:50:18 +0100
commit310d0f559656343c4fd849fa517a054c31b24a4e (patch)
tree7c4d3c9a1adc9e1163a4f603e2b72cb744b877e9 /src/gns/gns_tld_api.c
parent0fa813ec6c9083a9b689181daccdf1d8a0228ca7 (diff)
downloadgnunet-310d0f559656343c4fd849fa517a054c31b24a4e.tar.gz
gnunet-310d0f559656343c4fd849fa517a054c31b24a4e.zip
misc fixes to gnunet-gns-proxy, in particular avoiding MHD-busy waiting
Diffstat (limited to 'src/gns/gns_tld_api.c')
-rw-r--r--src/gns/gns_tld_api.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gns/gns_tld_api.c b/src/gns/gns_tld_api.c
index c78afa572..293e37140 100644
--- a/src/gns/gns_tld_api.c
+++ b/src/gns/gns_tld_api.c
@@ -57,9 +57,9 @@ struct GNUNET_GNS_LookupWithTldRequest
57 57
58 /** 58 /**
59 * Domain name we are resolving. 59 * Domain name we are resolving.
60 */ 60 */
61 char *name; 61 char *name;
62 62
63 /** 63 /**
64 * @e lookup_proc closure 64 * @e lookup_proc closure
65 */ 65 */
@@ -82,7 +82,7 @@ struct GNUNET_GNS_LookupWithTldRequest
82 82
83 /** 83 /**
84 * Lookup options. 84 * Lookup options.
85 */ 85 */
86 enum GNUNET_GNS_LocalOptions options; 86 enum GNUNET_GNS_LocalOptions options;
87}; 87};
88 88
@@ -144,7 +144,7 @@ process_lookup_result (void *cls,
144{ 144{
145 struct GNUNET_GNS_LookupWithTldRequest *ltr = cls; 145 struct GNUNET_GNS_LookupWithTldRequest *ltr = cls;
146 146
147 ltr->lr = NULL; 147 ltr->lr = NULL;
148 ltr->lookup_proc (ltr->lookup_proc_cls, 148 ltr->lookup_proc (ltr->lookup_proc_cls,
149 GNUNET_YES, 149 GNUNET_YES,
150 rd_count, 150 rd_count,
@@ -291,10 +291,12 @@ GNUNET_GNS_lookup_with_tld (struct GNUNET_GNS_Handle *handle,
291 /* Final case: TLD matches one of our egos */ 291 /* Final case: TLD matches one of our egos */
292 eat_tld (ltr->name); 292 eat_tld (ltr->name);
293 293
294 /* if the name is of the form 'label.gnu', never go to the DHT */ 294 /* if the name is of the form 'label' (and not 'label.SUBDOMAIN'), never go to the DHT */
295 if (NULL == strchr (ltr->name, 295 if (NULL == strchr (ltr->name,
296 (unsigned char) '.')) 296 (unsigned char) '.'))
297 ltr->options = GNUNET_GNS_LO_NO_DHT; 297 ltr->options = GNUNET_GNS_LO_NO_DHT;
298 else
299 ltr->options = GNUNET_GNS_LO_LOCAL_MASTER;
298 ltr->id_op = GNUNET_IDENTITY_ego_lookup (ltr->gns_handle->cfg, 300 ltr->id_op = GNUNET_IDENTITY_ego_lookup (ltr->gns_handle->cfg,
299 tld, 301 tld,
300 &identity_zone_cb, 302 &identity_zone_cb,