gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] branch master updated: only 16 bit for options


From: gnunet
Subject: [gnunet] branch master updated: only 16 bit for options
Date: Thu, 18 Aug 2022 19:00:19 +0200

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

grothoff pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 5a8b9a11a only 16 bit for options
5a8b9a11a is described below

commit 5a8b9a11a3050c91d99b43e4b2635d508385fc54
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Thu Aug 18 19:00:12 2022 +0200

    only 16 bit for options
---
 src/dht/gnunet-service-dht_neighbours.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/dht/gnunet-service-dht_neighbours.c 
b/src/dht/gnunet-service-dht_neighbours.c
index cc7333a9c..8611f2653 100644
--- a/src/dht/gnunet-service-dht_neighbours.c
+++ b/src/dht/gnunet-service-dht_neighbours.c
@@ -175,10 +175,15 @@ struct PeerResultMessage
    */
   uint32_t type GNUNET_PACKED;
 
+  /**
+   * Always 0.
+   */
+  uint16_t reserved GNUNET_PACKED;
+
   /**
    * Message options, actually an 'enum GNUNET_DHT_RouteOption' value in NBO.
    */
-  uint32_t options GNUNET_PACKED;
+  uint16_t options GNUNET_PACKED;
 
   /**
    * Length of the PUT path that follows (if tracked).
@@ -1771,7 +1776,7 @@ GDS_NEIGHBOURS_handle_reply (struct PeerInfo *pi,
     prm->header.type = htons (GNUNET_MESSAGE_TYPE_DHT_P2P_RESULT);
     prm->header.size = htons (sizeof (buf));
     prm->type = htonl ((uint32_t) bd->type);
-    prm->options = htonl ((uint32_t) ro);
+    prm->options = htons ((uint32_t) ro);
     prm->put_path_length = htons ((uint16_t) ppl);
     prm->get_path_length = htons ((uint16_t) get_path_length);
     prm->expiration_time = GNUNET_TIME_absolute_hton (bd->expiration_time);
@@ -2538,7 +2543,7 @@ handle_dht_p2p_result (void *cls,
   struct PeerInfo *peer = t->pi;
   uint16_t msize = ntohs (prm->header.size) - sizeof (*prm);
   enum GNUNET_DHT_RouteOption ro
-    = (enum GNUNET_DHT_RouteOption) ntohl (prm->options);
+    = (enum GNUNET_DHT_RouteOption) ntohs (prm->options);
   bool truncated = (0 != (ro & GNUNET_DHT_RO_TRUNCATED));
   bool tracked = (0 != (ro & GNUNET_DHT_RO_RECORD_ROUTE));
   uint16_t get_path_length = ntohs (prm->get_path_length);

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