[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: fix: htonl vs htons, thanks Bernd
From: |
gnunet |
Subject: |
[gnunet] branch master updated: fix: htonl vs htons, thanks Bernd |
Date: |
Sun, 19 Jun 2022 13:55:43 +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 71350f124 fix: htonl vs htons, thanks Bernd
71350f124 is described below
commit 71350f1244b236a44b45b81e7166a102997b5ed0
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun Jun 19 13:55:40 2022 +0200
fix: htonl vs htons, thanks Bernd
---
src/dht/gnunet-service-dht_neighbours.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/dht/gnunet-service-dht_neighbours.c
b/src/dht/gnunet-service-dht_neighbours.c
index 9a3abc376..fde25936f 100644
--- a/src/dht/gnunet-service-dht_neighbours.c
+++ b/src/dht/gnunet-service-dht_neighbours.c
@@ -1526,7 +1526,7 @@ GDS_NEIGHBOURS_handle_get (enum GNUNET_BLOCK_Type type,
pgm->options = htons (options);
pgm->hop_count = htons (hop_count + 1);
pgm->desired_replication_level = htons (desired_replication_level);
- pgm->result_filter_size = htonl (result_filter_size);
+ pgm->result_filter_size = htons ((uint16_t) result_filter_size);
GNUNET_break (GNUNET_YES ==
GNUNET_CONTAINER_bloomfilter_test (peer_bf,
&target->phash));
@@ -2061,7 +2061,7 @@ check_dht_p2p_get (void *cls,
const struct PeerGetMessage *get)
{
uint16_t msize = ntohs (get->header.size);
- uint32_t result_filter_size = ntohl (get->result_filter_size);
+ uint16_t result_filter_size = ntohs (get->result_filter_size);
(void) cls;
if (msize < sizeof(*get) + result_filter_size)
@@ -2086,8 +2086,8 @@ handle_dht_p2p_get (void *cls,
struct Target *t = cls;
struct PeerInfo *peer = t->pi;
uint16_t msize = ntohs (get->header.size);
- uint32_t result_filter_size = ntohl (get->result_filter_size);
- uint32_t hop_count = ntohs (get->hop_count);
+ uint16_t result_filter_size = ntohs (get->result_filter_size);
+ uint16_t hop_count = ntohs (get->hop_count);
enum GNUNET_BLOCK_Type type = (enum GNUNET_BLOCK_Type) ntohl (get->type);
enum GNUNET_DHT_RouteOption options = (enum GNUNET_DHT_RouteOption) ntohs (
get->options);
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: fix: htonl vs htons, thanks Bernd,
gnunet <=