- name = GNUNET_strdup (packet->queries[0].name);
- name_len = strlen (name);
- if ( (name_len > strlen (".zkey.eu")) &&
- (0 == strcasecmp (".zkey.eu",
- &name[name_len - strlen (".zkey.eu")])) )
- {
- //FIXME here check if the top label after zkey.eu is a hash and append
- //correct TLD appropriately
- name[name_len - strlen (".zkey.eu")] = '\0';
- strcat (name, ".gnunet"); /* little hack, only works because
- ".zkey.eu" is longer than ".gnunet" */
- name_len = strlen (name);
- }
- if ( (name_len > strlen (".gnunet")) &&
- (0 == strcasecmp (".gnunet",
- &name[name_len - strlen (".gnunet")])) )
- {
- type = packet->queries[0].type;
- request->lookup = GNUNET_GNS_lookup (gns,
- name,
- type,
- GNUNET_NO,
- NULL,
- &result_processor,
- request);
- }
- else
- {
- /* FIXME: do traditional *DNS* lookup; note that
- gnunet-service-dns already has code to do this;
- factor into library to share! Why not use GNUNET_RESOLVER here?*/
- GNUNET_break (0);
- }
- GNUNET_free (name);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Calling GNS on `%s'\n",
+ packet->queries[0].name);
+ request->lookup = GNUNET_GNS_lookup_with_tld (gns,
+ packet->queries[0].name,
+ packet->queries[0].type,
+ GNUNET_NO,
+ &result_processor,
+ request);