gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] 04/07: - fix gns


From: gnunet
Subject: [gnunet] 04/07: - fix gns
Date: Thu, 15 Oct 2020 12:18:58 +0200

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

commit 7b992510c25c0081c59c4b1f61fe42ff5dc7680d
Author: Martin Schanzenbach <mschanzenbach@posteo.de>
AuthorDate: Thu Oct 15 08:47:45 2020 +0200

    - fix gns
---
 src/gns/gnunet-service-gns_resolver.c | 9 ++++++---
 src/gnsrecord/gnsrecord_misc.c        | 5 ++++-
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/gns/gnunet-service-gns_resolver.c 
b/src/gns/gnunet-service-gns_resolver.c
index 09b7a0a85..16be7dedf 100644
--- a/src/gns/gnunet-service-gns_resolver.c
+++ b/src/gns/gnunet-service-gns_resolver.c
@@ -1696,10 +1696,11 @@ recursive_pkey_resolution (struct GNS_ResolverHandle 
*rh,
                            const struct GNUNET_GNSRECORD_Data *rd)
 {
   struct AuthorityChain *ac;
+  struct GNUNET_IDENTITY_PublicKey auth;
 
   /* delegation to another zone */
-  if (sizeof(struct GNUNET_IDENTITY_PublicKey) !=
-      rd->data_size)
+  if (GNUNET_OK != GNUNET_GNSRECORD_record_to_identity_key (rd,
+                                                            &auth))
   {
     GNUNET_break_op (0);
     fail_resolution (rh);
@@ -1709,6 +1710,7 @@ recursive_pkey_resolution (struct GNS_ResolverHandle *rh,
   ac = GNUNET_new (struct AuthorityChain);
   ac->rh = rh;
   ac->gns_authority = GNUNET_YES;
+  ac->authority_info.gns_authority = auth;
   GNUNET_GNSRECORD_record_to_identity_key (rd,
                                            &ac->authority_info.gns_authority);
   ac->label = resolver_lookup_get_next_label (rh);
@@ -2272,7 +2274,8 @@ handle_gns_resolution_result (void *cls,
             ac->rh = rh;
             ac->gns_authority = GNUNET_YES;
             GNUNET_GNSRECORD_record_to_identity_key (&rd[i],
-                                                     
&ac->authority_info.gns_authority);
+                                                     &ac->authority_info.
+                                                     gns_authority);
             ac->label = GNUNET_strdup (GNUNET_GNS_EMPTY_LABEL_AT);
             GNUNET_CONTAINER_DLL_insert_tail (rh->ac_head,
                                               rh->ac_tail,
diff --git a/src/gnsrecord/gnsrecord_misc.c b/src/gnsrecord/gnsrecord_misc.c
index cfe310422..4b1695d69 100644
--- a/src/gnsrecord/gnsrecord_misc.c
+++ b/src/gnsrecord/gnsrecord_misc.c
@@ -329,7 +329,10 @@ enum GNUNET_GenericReturnValue
 GNUNET_GNSRECORD_record_to_identity_key (const struct GNUNET_GNSRECORD_Data 
*rd,
                                          struct GNUNET_IDENTITY_PublicKey *key)
 {
-  switch (ntohl (rd->record_type))
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Got record of type %u\n",
+              rd->record_type);
+  switch (rd->record_type)
   {
   case GNUNET_GNSRECORD_TYPE_PKEY:
     key->type = htonl (rd->record_type);

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]