gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] 07/11: Bootstrap: Fixed bug to not replace hellos for a peer.


From: gnunet
Subject: [gnunet] 07/11: Bootstrap: Fixed bug to not replace hellos for a peer.
Date: Wed, 18 Oct 2023 15:49:36 +0200

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

t3sserakt pushed a commit to branch master
in repository gnunet.

commit 05165382791e22f6419712841dbfaddebed09280
Author: t3sserakt <t3ss@posteo.de>
AuthorDate: Wed Oct 18 13:53:29 2023 +0200

    Bootstrap: Fixed bug to not replace hellos for a peer.
---
 src/peerstore/gnunet-service-peerstore.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/peerstore/gnunet-service-peerstore.c 
b/src/peerstore/gnunet-service-peerstore.c
index 514b173bb..2a8ecdfa2 100644
--- a/src/peerstore/gnunet-service-peerstore.c
+++ b/src/peerstore/gnunet-service-peerstore.c
@@ -555,7 +555,7 @@ hosts_directory_scan_callback (void *cls, const char 
*fullname)
   char buffer[GNUNET_MAX_MESSAGE_SIZE - 1] GNUNET_ALIGN;
   const struct GNUNET_MessageHeader *hello;
   struct GNUNET_HELLO_Builder *builder;
-  struct GNUNET_PeerIdentity *pid;
+  const struct GNUNET_PeerIdentity *pid;
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "1 hosts_directory_scan_callback filename %s\n",
@@ -598,14 +598,18 @@ hosts_directory_scan_callback (void *cls, const char 
*fullname)
   builder = GNUNET_HELLO_builder_from_msg (hello);
   pid = GNUNET_HELLO_builder_get_id (builder);
 
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "store contrib hello for peer %s\n",
+              GNUNET_i2s (pid));
+  
   if (GNUNET_OK != db->store_record (db->cls,
                                      "peerstore",
                                      pid,
-                                     "",
+                                     GNUNET_PEERSTORE_HELLO_KEY,
                                      hello,
                                      size_total,
                                      GNUNET_TIME_UNIT_FOREVER_ABS,
-                                     GNUNET_PEERSTORE_STOREOPTION_REPLACE,
+                                     GNUNET_PEERSTORE_STOREOPTION_MULTIPLE,
                                      &store_hello_continuation,
                                      NULL))
   {

-- 
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]