[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] 39/40: Make fs and cadet build again; cadet hello handling susp
From: |
gnunet |
Subject: |
[gnunet] 39/40: Make fs and cadet build again; cadet hello handling suspicious |
Date: |
Thu, 05 Oct 2023 08:57:42 +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 64da532846b5a51c1e7eaee45833e12e2335b11e
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Thu Oct 5 08:22:04 2023 +0200
Make fs and cadet build again; cadet hello handling suspicious
---
src/cadet/gnunet-service-cadet_dht.c | 11 +++++-----
src/fs/gnunet-service-fs.c | 39 ------------------------------------
src/fs/gnunet-service-fs.h | 1 -
3 files changed, 5 insertions(+), 46 deletions(-)
diff --git a/src/cadet/gnunet-service-cadet_dht.c
b/src/cadet/gnunet-service-cadet_dht.c
index 576753a38..9a8082339 100644
--- a/src/cadet/gnunet-service-cadet_dht.c
+++ b/src/cadet/gnunet-service-cadet_dht.c
@@ -119,7 +119,7 @@ dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute
exp,
size_t size,
const void *data)
{
- const struct GNUNET_HELLO_Message *hello = data;
+ const struct GNUNET_MessageHeader *hello = data;
(void) trunc_peer;
GCPP_try_path_from_dht (get_path,
@@ -127,8 +127,7 @@ dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute
exp,
put_path,
put_path_length);
if ((size >= sizeof(struct GNUNET_HELLO_Message)) &&
- (ntohs (hello->header.size) == size) &&
- (size == GNUNET_HELLO_size (hello)))
+ (ntohs (hello->size) == size))
{
struct CadetPeer *peer;
@@ -152,13 +151,13 @@ static void
announce_id (void *cls)
{
struct GNUNET_HashCode phash;
- const struct GNUNET_HELLO_Message *hello;
+ const struct GNUNET_MessageHeader *hello;
size_t size;
struct GNUNET_TIME_Absolute expiration;
struct GNUNET_TIME_Relative next_put;
hello = GCH_get_mine ();
- size = (NULL != hello) ? GNUNET_HELLO_size (hello) : 0;
+ size = (NULL != hello) ? ntohs(hello->size) : 0;
if (0 == size)
{
expiration = GNUNET_TIME_absolute_add (GNUNET_TIME_absolute_get (),
@@ -167,7 +166,7 @@ announce_id (void *cls)
}
else
{
- expiration = GNUNET_HELLO_get_last_expiration (hello);
+ expiration = GNUNET_HELLO_builder_get_expiration_time (hello);
announce_delay = GNUNET_TIME_UNIT_SECONDS;
}
diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c
index c4193c2e4..1ab6ac2b8 100644
--- a/src/fs/gnunet-service-fs.c
+++ b/src/fs/gnunet-service-fs.c
@@ -553,45 +553,6 @@ GSF_test_get_load_too_high_ (uint32_t priority)
}
-/**
- * We've received peer performance information. Update
- * our running average for the P2P latency.
- *
- * @param cls closure
- * @param address the address
- * @param active is this address in active use
- * @param bandwidth_out assigned outbound bandwidth for the connection
- * @param bandwidth_in assigned inbound bandwidth for the connection
- * @param prop performance data for the address (as far as known)
- */
-static void
-update_latencies (void *cls,
- const struct GNUNET_HELLO_Address *address,
- int active,
- struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
- struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
- const struct GNUNET_ATS_Properties *prop)
-{
- if (NULL == address)
- {
- /* ATS service temporarily disconnected */
- return;
- }
-
- if (GNUNET_YES != active)
- return;
- GSF_update_peer_latency_ (&address->peer,
- prop->delay);
- GSF_avg_latency.rel_value_us =
- (GSF_avg_latency.rel_value_us * 31
- + GNUNET_MIN (5000, prop->delay.rel_value_us)) / 32;
- GNUNET_STATISTICS_set (GSF_stats,
- gettext_noop ("# running average P2P latency (ms)"),
- GSF_avg_latency.rel_value_us / 1000LL,
- GNUNET_NO);
-}
-
-
/**
* Check P2P "PUT" message.
*
diff --git a/src/fs/gnunet-service-fs.h b/src/fs/gnunet-service-fs.h
index 7bbab1022..e102a1fba 100644
--- a/src/fs/gnunet-service-fs.h
+++ b/src/fs/gnunet-service-fs.h
@@ -30,7 +30,6 @@
#include "gnunet_statistics_service.h"
#include "gnunet_core_service.h"
#include "gnunet_block_lib.h"
-#include "gnunet_ats_service.h"
#include "fs.h"
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet] 16/40: TOPOLOGY: Exchanged peerinfo api to store hellos with new peerstore api., (continued)
- [gnunet] 16/40: TOPOLOGY: Exchanged peerinfo api to store hellos with new peerstore api., gnunet, 2023/10/05
- [gnunet] 19/40: HELLO: Cli tool for changing hello files in contrib can change file from old to new hello design., gnunet, 2023/10/05
- [gnunet] 07/40: NEWS: Added command to execute a script., gnunet, 2023/10/05
- [gnunet] 17/40: PEERSTORE: change watch to return actual values, before watching., gnunet, 2023/10/05
- [gnunet] 32/40: Merge branch 'master' into l20integration, gnunet, 2023/10/05
- [gnunet] 29/40: TNG: Fixed syntax., gnunet, 2023/10/05
- [gnunet] 03/40: News: Merge branch 'l20integration' of ssh://git.gnunet.org/gnunet into l20integration, gnunet, 2023/10/05
- [gnunet] 36/40: Fix warnings; CADET not FTBFS because old hello removed, gnunet, 2023/10/05
- [gnunet] 33/40: Merge branch 'master' into l20integration, gnunet, 2023/10/05
- [gnunet] 18/40: NEWS: The old hello design replaced by the new hello design., gnunet, 2023/10/05
- [gnunet] 39/40: Make fs and cadet build again; cadet hello handling suspicious,
gnunet <=
- [gnunet] 25/40: Hello: Changed address and hello format to new TNG format., gnunet, 2023/10/05
- [gnunet] 38/40: Remove more traces of old transport, gnunet, 2023/10/05
- [gnunet] 31/40: BUILD: Make meson build without ats, tesbed, peerinfo, gnunet, 2023/10/05
- [gnunet] 37/40: Remove more traces of ATS, gnunet, 2023/10/05
- [gnunet] 30/40: Merge branch 'master' into l20integration, gnunet, 2023/10/05
- [gnunet] 40/40: Update to new transport binary, gnunet, 2023/10/05
- [gnunet] 10/40: TNG: Added Testcase that just runs two peers, and blocks., gnunet, 2023/10/05
- [gnunet] 14/40: NEWS: Added api to store hellos with peerstore service., gnunet, 2023/10/05
- [gnunet] 20/40: PEERSTORE: Moved code to scan and import hello file into peerstore from peerinfo., gnunet, 2023/10/05
- [gnunet] 26/40: Peerstore: Fixed bug in bootstrap code, gnunet, 2023/10/05