aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authort3sserakt <t3ss@posteo.de>2023-11-13 10:58:12 +0100
committert3sserakt <t3ss@posteo.de>2023-11-13 10:58:12 +0100
commit4e77b10982effa677c8da5a8aba888f87ad4f336 (patch)
treec8f6f56c6e303d3216a5fb636ef90ab2e6750c23
parentbdefb48e33d15a92f28aeea99b646dbda22acf70 (diff)
downloadgnunet-4e77b10982effa677c8da5a8aba888f87ad4f336.tar.gz
gnunet-4e77b10982effa677c8da5a8aba888f87ad4f336.zip
Peerstore: We replace existing hellos. Only the origin peer merges hellos.
-rw-r--r--src/service/peerstore/peerstore_api.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/service/peerstore/peerstore_api.c b/src/service/peerstore/peerstore_api.c
index 188ab788b..9014193c7 100644
--- a/src/service/peerstore/peerstore_api.c
+++ b/src/service/peerstore/peerstore_api.c
@@ -1207,7 +1207,7 @@ store_hello (struct GNUNET_PEERSTORE_StoreHelloContext *huc,
1207 hello, 1207 hello,
1208 ntohs (hello->size), 1208 ntohs (hello->size),
1209 hello_exp, 1209 hello_exp,
1210 GNUNET_PEERSTORE_STOREOPTION_MULTIPLE, 1210 GNUNET_PEERSTORE_STOREOPTION_REPLACE,
1211 merge_success, 1211 merge_success,
1212 shu_cls); 1212 shu_cls);
1213 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1213 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -1220,7 +1220,8 @@ store_hello (struct GNUNET_PEERSTORE_StoreHelloContext *huc,
1220 shu_cls->sc = sc; 1220 shu_cls->sc = sc;
1221} 1221}
1222 1222
1223 1223//TODO Find a better name for the function. We do not merge, but replace, if there is a storing process
1224// during another store process with a newer hello.
1224static void 1225static void
1225merge_uri (void *cls, 1226merge_uri (void *cls,
1226 const struct GNUNET_PEERSTORE_Record *record, 1227 const struct GNUNET_PEERSTORE_Record *record,