aboutsummaryrefslogtreecommitdiff
path: root/src/gns/gnunet-service-gns_resolver.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gns/gnunet-service-gns_resolver.c')
-rw-r--r--src/gns/gnunet-service-gns_resolver.c34
1 files changed, 1 insertions, 33 deletions
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c
index 5e957871e..40b340ad7 100644
--- a/src/gns/gnunet-service-gns_resolver.c
+++ b/src/gns/gnunet-service-gns_resolver.c
@@ -327,11 +327,6 @@ struct GNS_ResolverHandle
327 struct AuthorityChain *ac_tail; 327 struct AuthorityChain *ac_tail;
328 328
329 /** 329 /**
330 * Private key of the shorten zone, NULL to not shorten.
331 */
332 struct GNUNET_CRYPTO_EcdsaPrivateKey *shorten_key;
333
334 /**
335 * ID of a task associated with the resolution process. 330 * ID of a task associated with the resolution process.
336 */ 331 */
337 struct GNUNET_SCHEDULER_Task * task_id; 332 struct GNUNET_SCHEDULER_Task * task_id;
@@ -1750,23 +1745,6 @@ handle_gns_resolution_result (void *cls,
1750 } /* end: switch */ 1745 } /* end: switch */
1751 } /* end: for rd_count */ 1746 } /* end: for rd_count */
1752 1747
1753 /* trigger shortening */
1754 if ((NULL != rh->shorten_key) &&
1755 (NULL != shorten_ac) &&
1756 (GNUNET_NO == shorten_ac->shortening_started) &&
1757 (NULL != shorten_ac->suggested_shortening_label))
1758 {
1759 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1760 "Start shortening for label `%s' based on nick `%s'\n",
1761 shorten_ac->label,
1762 shorten_ac->suggested_shortening_label);
1763 shorten_ac->shortening_started = GNUNET_YES;
1764 GNS_shorten_start (shorten_ac->label,
1765 shorten_ac->suggested_shortening_label,
1766 &shorten_ac->authority_info.gns_authority,
1767 rh->shorten_key);
1768 }
1769
1770 /* yes, we are done, return result */ 1748 /* yes, we are done, return result */
1771 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1749 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1772 "Returning GNS response for `%s' with %u answers\n", 1750 "Returning GNS response for `%s' with %u answers\n",
@@ -2374,7 +2352,6 @@ start_resolver_lookup (struct GNS_ResolverHandle *rh)
2374 * @param zone the zone to perform the lookup in 2352 * @param zone the zone to perform the lookup in
2375 * @param record_type the record type to look up 2353 * @param record_type the record type to look up
2376 * @param name the name to look up 2354 * @param name the name to look up
2377 * @param shorten_key a private key for use with PSEU import (can be NULL)
2378 * @param options local options to control local lookup 2355 * @param options local options to control local lookup
2379 * @param proc the processor to call on result 2356 * @param proc the processor to call on result
2380 * @param proc_cls the closure to pass to @a proc 2357 * @param proc_cls the closure to pass to @a proc
@@ -2384,16 +2361,13 @@ struct GNS_ResolverHandle *
2384GNS_resolver_lookup (const struct GNUNET_CRYPTO_EcdsaPublicKey *zone, 2361GNS_resolver_lookup (const struct GNUNET_CRYPTO_EcdsaPublicKey *zone,
2385 uint32_t record_type, 2362 uint32_t record_type,
2386 const char *name, 2363 const char *name,
2387 const struct GNUNET_CRYPTO_EcdsaPrivateKey *shorten_key,
2388 enum GNUNET_GNS_LocalOptions options, 2364 enum GNUNET_GNS_LocalOptions options,
2389 GNS_ResultProcessor proc, void *proc_cls) 2365 GNS_ResultProcessor proc, void *proc_cls)
2390{ 2366{
2391 struct GNS_ResolverHandle *rh; 2367 struct GNS_ResolverHandle *rh;
2392 2368
2393 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2369 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2394 (NULL == shorten_key) 2370 "Starting lookup for `%s'\n",
2395 ? "Starting lookup for `%s' with shortening disabled\n"
2396 : "Starting lookup for `%s' with shortening enabled\n",
2397 name); 2371 name);
2398 rh = GNUNET_new (struct GNS_ResolverHandle); 2372 rh = GNUNET_new (struct GNS_ResolverHandle);
2399 GNUNET_CONTAINER_DLL_insert (rlh_head, 2373 GNUNET_CONTAINER_DLL_insert (rlh_head,
@@ -2406,11 +2380,6 @@ GNS_resolver_lookup (const struct GNUNET_CRYPTO_EcdsaPublicKey *zone,
2406 rh->record_type = record_type; 2380 rh->record_type = record_type;
2407 rh->name = GNUNET_strdup (name); 2381 rh->name = GNUNET_strdup (name);
2408 rh->name_resolution_pos = strlen (name); 2382 rh->name_resolution_pos = strlen (name);
2409 if (NULL != shorten_key)
2410 {
2411 rh->shorten_key = GNUNET_new (struct GNUNET_CRYPTO_EcdsaPrivateKey);
2412 *rh->shorten_key = *shorten_key;
2413 }
2414 start_resolver_lookup (rh); 2383 start_resolver_lookup (rh);
2415 return rh; 2384 return rh;
2416} 2385}
@@ -2507,7 +2476,6 @@ GNS_resolver_lookup_cancel (struct GNS_ResolverHandle *rh)
2507 dr); 2476 dr);
2508 GNUNET_free (dr); 2477 GNUNET_free (dr);
2509 } 2478 }
2510 GNUNET_free_non_null (rh->shorten_key);
2511 GNUNET_free (rh->name); 2479 GNUNET_free (rh->name);
2512 GNUNET_free (rh); 2480 GNUNET_free (rh);
2513} 2481}