diff options
author | xrs <xrs@mail36.net> | 2017-02-28 19:37:43 +0100 |
---|---|---|
committer | xrs <xrs@mail36.net> | 2017-02-28 19:37:43 +0100 |
commit | f82b3a27df765f4a31548ae4efe66dc3dbc42cef (patch) | |
tree | 5a08cd0026d2b85bca3160b6ca40573c871c8635 /src/gns/gnunet-service-gns_resolver.c | |
parent | b0042448a40e90426ea8013b1abba8b2ecb69c2b (diff) | |
parent | a9a6b98c54f5cc3e680c8ea2f9c69e3955e2a7da (diff) | |
download | gnunet-f82b3a27df765f4a31548ae4efe66dc3dbc42cef.tar.gz gnunet-f82b3a27df765f4a31548ae4efe66dc3dbc42cef.zip |
Merge branch 'master' of ssh://gnunet.org/gnunet
Conflicts:
src/multicast/test_multicast_multipeer.c
Diffstat (limited to 'src/gns/gnunet-service-gns_resolver.c')
-rw-r--r-- | src/gns/gnunet-service-gns_resolver.c | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c index 5e957871e..c58190599 100644 --- a/src/gns/gnunet-service-gns_resolver.c +++ b/src/gns/gnunet-service-gns_resolver.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include "gnunet_dht_service.h" | 30 | #include "gnunet_dht_service.h" |
31 | #include "gnunet_gnsrecord_lib.h" | 31 | #include "gnunet_gnsrecord_lib.h" |
32 | #include "gnunet_namecache_service.h" | 32 | #include "gnunet_namecache_service.h" |
33 | #include "gnunet_namestore_service.h" | ||
34 | #include "gnunet_dns_service.h" | 33 | #include "gnunet_dns_service.h" |
35 | #include "gnunet_resolver_service.h" | 34 | #include "gnunet_resolver_service.h" |
36 | #include "gnunet_revocation_service.h" | 35 | #include "gnunet_revocation_service.h" |
@@ -39,7 +38,6 @@ | |||
39 | #include "gnunet_gns_service.h" | 38 | #include "gnunet_gns_service.h" |
40 | #include "gns.h" | 39 | #include "gns.h" |
41 | #include "gnunet-service-gns_resolver.h" | 40 | #include "gnunet-service-gns_resolver.h" |
42 | #include "gnunet-service-gns_shorten.h" | ||
43 | #include "gnunet_vpn_service.h" | 41 | #include "gnunet_vpn_service.h" |
44 | 42 | ||
45 | 43 | ||
@@ -327,11 +325,6 @@ struct GNS_ResolverHandle | |||
327 | struct AuthorityChain *ac_tail; | 325 | struct AuthorityChain *ac_tail; |
328 | 326 | ||
329 | /** | 327 | /** |
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. | 328 | * ID of a task associated with the resolution process. |
336 | */ | 329 | */ |
337 | struct GNUNET_SCHEDULER_Task * task_id; | 330 | struct GNUNET_SCHEDULER_Task * task_id; |
@@ -1750,23 +1743,6 @@ handle_gns_resolution_result (void *cls, | |||
1750 | } /* end: switch */ | 1743 | } /* end: switch */ |
1751 | } /* end: for rd_count */ | 1744 | } /* end: for rd_count */ |
1752 | 1745 | ||
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 */ | 1746 | /* yes, we are done, return result */ |
1771 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1747 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1772 | "Returning GNS response for `%s' with %u answers\n", | 1748 | "Returning GNS response for `%s' with %u answers\n", |
@@ -2374,7 +2350,6 @@ start_resolver_lookup (struct GNS_ResolverHandle *rh) | |||
2374 | * @param zone the zone to perform the lookup in | 2350 | * @param zone the zone to perform the lookup in |
2375 | * @param record_type the record type to look up | 2351 | * @param record_type the record type to look up |
2376 | * @param name the name to look up | 2352 | * @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 | 2353 | * @param options local options to control local lookup |
2379 | * @param proc the processor to call on result | 2354 | * @param proc the processor to call on result |
2380 | * @param proc_cls the closure to pass to @a proc | 2355 | * @param proc_cls the closure to pass to @a proc |
@@ -2384,16 +2359,13 @@ struct GNS_ResolverHandle * | |||
2384 | GNS_resolver_lookup (const struct GNUNET_CRYPTO_EcdsaPublicKey *zone, | 2359 | GNS_resolver_lookup (const struct GNUNET_CRYPTO_EcdsaPublicKey *zone, |
2385 | uint32_t record_type, | 2360 | uint32_t record_type, |
2386 | const char *name, | 2361 | const char *name, |
2387 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *shorten_key, | ||
2388 | enum GNUNET_GNS_LocalOptions options, | 2362 | enum GNUNET_GNS_LocalOptions options, |
2389 | GNS_ResultProcessor proc, void *proc_cls) | 2363 | GNS_ResultProcessor proc, void *proc_cls) |
2390 | { | 2364 | { |
2391 | struct GNS_ResolverHandle *rh; | 2365 | struct GNS_ResolverHandle *rh; |
2392 | 2366 | ||
2393 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2367 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2394 | (NULL == shorten_key) | 2368 | "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); | 2369 | name); |
2398 | rh = GNUNET_new (struct GNS_ResolverHandle); | 2370 | rh = GNUNET_new (struct GNS_ResolverHandle); |
2399 | GNUNET_CONTAINER_DLL_insert (rlh_head, | 2371 | GNUNET_CONTAINER_DLL_insert (rlh_head, |
@@ -2406,11 +2378,6 @@ GNS_resolver_lookup (const struct GNUNET_CRYPTO_EcdsaPublicKey *zone, | |||
2406 | rh->record_type = record_type; | 2378 | rh->record_type = record_type; |
2407 | rh->name = GNUNET_strdup (name); | 2379 | rh->name = GNUNET_strdup (name); |
2408 | rh->name_resolution_pos = strlen (name); | 2380 | 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); | 2381 | start_resolver_lookup (rh); |
2415 | return rh; | 2382 | return rh; |
2416 | } | 2383 | } |
@@ -2507,7 +2474,6 @@ GNS_resolver_lookup_cancel (struct GNS_ResolverHandle *rh) | |||
2507 | dr); | 2474 | dr); |
2508 | GNUNET_free (dr); | 2475 | GNUNET_free (dr); |
2509 | } | 2476 | } |
2510 | GNUNET_free_non_null (rh->shorten_key); | ||
2511 | GNUNET_free (rh->name); | 2477 | GNUNET_free (rh->name); |
2512 | GNUNET_free (rh); | 2478 | GNUNET_free (rh); |
2513 | } | 2479 | } |