diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-09-25 13:42:24 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-09-25 13:42:24 +0000 |
commit | 9923e764b2f93a44c91125038d52282a3377e371 (patch) | |
tree | b9c4a814f26003d30900883081856661a0b0ceed /src/gns/gnunet-service-gns_resolver.c | |
parent | d3efdf93da7b501244a7f87635dc518ce4b68d26 (diff) | |
download | gnunet-9923e764b2f93a44c91125038d52282a3377e371.tar.gz gnunet-9923e764b2f93a44c91125038d52282a3377e371.zip |
-fix cname lookup
Diffstat (limited to 'src/gns/gnunet-service-gns_resolver.c')
-rw-r--r-- | src/gns/gnunet-service-gns_resolver.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c index 496b5e985..2c3a9193d 100644 --- a/src/gns/gnunet-service-gns_resolver.c +++ b/src/gns/gnunet-service-gns_resolver.c | |||
@@ -946,6 +946,7 @@ handle_gns_cname_result (struct GNS_ResolverHandle *rh, | |||
946 | { | 946 | { |
947 | size_t nlen; | 947 | size_t nlen; |
948 | char *res; | 948 | char *res; |
949 | struct AuthorityChain *ac; | ||
949 | 950 | ||
950 | nlen = strlen (cname); | 951 | nlen = strlen (cname); |
951 | if ( (nlen > 2) && | 952 | if ( (nlen > 2) && |
@@ -970,6 +971,20 @@ handle_gns_cname_result (struct GNS_ResolverHandle *rh, | |||
970 | } | 971 | } |
971 | GNUNET_free (rh->name); | 972 | GNUNET_free (rh->name); |
972 | rh->name = res; | 973 | rh->name = res; |
974 | ac = GNUNET_new (struct AuthorityChain); | ||
975 | ac->rh = rh; | ||
976 | ac->gns_authority = GNUNET_YES; | ||
977 | ac->authority_info.gns_authority = rh->ac_tail->authority_info.gns_authority; | ||
978 | ac->label = resolver_lookup_get_next_label (rh); | ||
979 | /* tigger shortening */ | ||
980 | if (NULL != rh->shorten_key) | ||
981 | GNS_shorten_start (rh->ac_tail->label, | ||
982 | &ac->authority_info.gns_authority, | ||
983 | rh->shorten_key); | ||
984 | /* add AC to tail */ | ||
985 | GNUNET_CONTAINER_DLL_insert_tail (rh->ac_head, | ||
986 | rh->ac_tail, | ||
987 | ac); | ||
973 | rh->task_id = GNUNET_SCHEDULER_add_now (&recursive_resolution, | 988 | rh->task_id = GNUNET_SCHEDULER_add_now (&recursive_resolution, |
974 | rh); | 989 | rh); |
975 | return; | 990 | return; |