gnunet-svn
[Top][All Lists]
Advanced

[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.



reply via email to

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