aboutsummaryrefslogtreecommitdiff
path: root/src/gns/gnunet-service-gns_resolver.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-05-20 18:41:48 +0200
committerChristian Grothoff <christian@grothoff.org>2018-05-20 18:41:48 +0200
commit6f32b2b8ccbf536ddd38a3f6e8a4ec486b12e78b (patch)
tree64ce5622411eadbabb8f276fa4c24199f112e4f2 /src/gns/gnunet-service-gns_resolver.c
parent565515da0f7f770852bd81ab854d503ff1ef6c4b (diff)
downloadgnunet-6f32b2b8ccbf536ddd38a3f6e8a4ec486b12e78b.tar.gz
gnunet-6f32b2b8ccbf536ddd38a3f6e8a4ec486b12e78b.zip
remove dead shorten logic
Diffstat (limited to 'src/gns/gnunet-service-gns_resolver.c')
-rw-r--r--src/gns/gnunet-service-gns_resolver.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c
index 369bd3d63..edb3d5231 100644
--- a/src/gns/gnunet-service-gns_resolver.c
+++ b/src/gns/gnunet-service-gns_resolver.c
@@ -151,16 +151,6 @@ struct AuthorityChain
151 char *label; 151 char *label;
152 152
153 /** 153 /**
154 * label/name suggested for shortening to the authority
155 */
156 char *suggested_shortening_label;
157
158 /**
159 * Do we already try to shorten this authority?
160 */
161 int shortening_started;
162
163 /**
164 * #GNUNET_YES if the authority was a GNS authority, 154 * #GNUNET_YES if the authority was a GNS authority,
165 * #GNUNET_NO if the authority was a DNS authority. 155 * #GNUNET_NO if the authority was a DNS authority.
166 */ 156 */
@@ -1243,8 +1233,6 @@ handle_gns_cname_result (struct GNS_ResolverHandle *rh,
1243 ac->gns_authority = GNUNET_YES; 1233 ac->gns_authority = GNUNET_YES;
1244 ac->authority_info.gns_authority = rh->ac_tail->authority_info.gns_authority; 1234 ac->authority_info.gns_authority = rh->ac_tail->authority_info.gns_authority;
1245 ac->label = resolver_lookup_get_next_label (rh); 1235 ac->label = resolver_lookup_get_next_label (rh);
1246 ac->suggested_shortening_label = NULL;
1247 ac->shortening_started = GNUNET_NO;
1248 /* add AC to tail */ 1236 /* add AC to tail */
1249 GNUNET_CONTAINER_DLL_insert_tail (rh->ac_head, 1237 GNUNET_CONTAINER_DLL_insert_tail (rh->ac_head,
1250 rh->ac_tail, 1238 rh->ac_tail,
@@ -1620,8 +1608,6 @@ recursive_pkey_resolution (struct GNS_ResolverHandle *rh,
1620 ac = GNUNET_new (struct AuthorityChain); 1608 ac = GNUNET_new (struct AuthorityChain);
1621 ac->rh = rh; 1609 ac->rh = rh;
1622 ac->gns_authority = GNUNET_YES; 1610 ac->gns_authority = GNUNET_YES;
1623 ac->suggested_shortening_label = NULL;
1624 ac->shortening_started = GNUNET_NO;
1625 GNUNET_memcpy (&ac->authority_info.gns_authority, 1611 GNUNET_memcpy (&ac->authority_info.gns_authority,
1626 rd->data, 1612 rd->data,
1627 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey)); 1613 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey));
@@ -1817,7 +1803,6 @@ handle_gns_resolution_result (void *cls,
1817 const struct GNUNET_GNSRECORD_Data *rd) 1803 const struct GNUNET_GNSRECORD_Data *rd)
1818{ 1804{
1819 struct GNS_ResolverHandle *rh = cls; 1805 struct GNS_ResolverHandle *rh = cls;
1820 struct AuthorityChain *shorten_ac;
1821 char *cname; 1806 char *cname;
1822 struct VpnContext *vpn_ctx; 1807 struct VpnContext *vpn_ctx;
1823 const struct GNUNET_TUN_GnsVpnRecord *vpn; 1808 const struct GNUNET_TUN_GnsVpnRecord *vpn;
@@ -1947,7 +1932,6 @@ handle_gns_resolution_result (void *cls,
1947 using 'scratch' array for memory allocations */ 1932 using 'scratch' array for memory allocations */
1948 scratch_off = 0; 1933 scratch_off = 0;
1949 rd_off = 0; 1934 rd_off = 0;
1950 shorten_ac = rh->ac_tail;
1951 for (unsigned int i=0;i<rd_count;i++) 1935 for (unsigned int i=0;i<rd_count;i++)
1952 { 1936 {
1953 GNUNET_assert (rd_off <= i); 1937 GNUNET_assert (rd_off <= i);
@@ -2125,8 +2109,6 @@ handle_gns_resolution_result (void *cls,
2125 GNUNET_break_op (0); 2109 GNUNET_break_op (0);
2126 break; 2110 break;
2127 } 2111 }
2128 if (NULL == shorten_ac->suggested_shortening_label)
2129 shorten_ac->suggested_shortening_label = GNUNET_strdup (nick);
2130 break; 2112 break;
2131 } 2113 }
2132 case GNUNET_GNSRECORD_TYPE_PKEY: 2114 case GNUNET_GNSRECORD_TYPE_PKEY:
@@ -2152,8 +2134,6 @@ handle_gns_resolution_result (void *cls,
2152 ac->gns_authority = GNUNET_YES; 2134 ac->gns_authority = GNUNET_YES;
2153 ac->authority_info.gns_authority = pub; 2135 ac->authority_info.gns_authority = pub;
2154 ac->label = GNUNET_strdup (GNUNET_GNS_EMPTY_LABEL_AT); 2136 ac->label = GNUNET_strdup (GNUNET_GNS_EMPTY_LABEL_AT);
2155 ac->suggested_shortening_label = NULL;
2156 ac->shortening_started = GNUNET_NO;
2157 GNUNET_CONTAINER_DLL_insert_tail (rh->ac_head, 2137 GNUNET_CONTAINER_DLL_insert_tail (rh->ac_head,
2158 rh->ac_tail, 2138 rh->ac_tail,
2159 ac); 2139 ac);
@@ -2675,7 +2655,6 @@ start_resolver_lookup (void *cls)
2675 ac = GNUNET_new (struct AuthorityChain); 2655 ac = GNUNET_new (struct AuthorityChain);
2676 ac->rh = rh; 2656 ac->rh = rh;
2677 ac->label = resolver_lookup_get_next_label (rh); 2657 ac->label = resolver_lookup_get_next_label (rh);
2678 ac->suggested_shortening_label = NULL;
2679 if (NULL == ac->label) 2658 if (NULL == ac->label)
2680 /* name was just the "TLD", so we default to label 2659 /* name was just the "TLD", so we default to label
2681 #GNUNET_GNS_EMPTY_LABEL_AT */ 2660 #GNUNET_GNS_EMPTY_LABEL_AT */
@@ -2789,7 +2768,6 @@ GNS_resolver_lookup_cancel (struct GNS_ResolverHandle *rh)
2789 GNUNET_DNSSTUB_stop (ac->authority_info.dns_authority.dns_handle); 2768 GNUNET_DNSSTUB_stop (ac->authority_info.dns_authority.dns_handle);
2790 } 2769 }
2791 GNUNET_free (ac->label); 2770 GNUNET_free (ac->label);
2792 GNUNET_free_non_null (ac->suggested_shortening_label);
2793 GNUNET_free (ac); 2771 GNUNET_free (ac);
2794 } 2772 }
2795 if (NULL != rh->task_id) 2773 if (NULL != rh->task_id)