From 14da59e43311204cadc883cd3688be08bd77b6a8 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 12 Jun 2022 17:41:12 +0200 Subject: -fix endianess conversion for url_counter --- src/hello/hello-uri.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hello/hello-uri.c b/src/hello/hello-uri.c index c8e9b9f06..dd191738f 100644 --- a/src/hello/hello-uri.c +++ b/src/hello/hello-uri.c @@ -572,7 +572,7 @@ GNUNET_HELLO_builder_to_env (const struct GNUNET_HELLO_Builder *builder, env = GNUNET_MQ_msg_extra (msg, blen, GNUNET_MESSAGE_TYPE_HELLO_URI); - msg->url_counter = htonl ((uint16_t) builder->a_length); + msg->url_counter = htons ((uint16_t) builder->a_length); GNUNET_assert (GNUNET_OK == GNUNET_HELLO_builder_to_block (builder, priv, @@ -625,7 +625,7 @@ GNUNET_HELLO_builder_to_dht_hello_msg ( msg->sig = block->sig; msg->expiration_time = block->expiration_time; } - msg->url_counter = htonl ((uint16_t) builder->a_length); + msg->url_counter = htons ((uint16_t) builder->a_length); return &msg->header; } -- cgit v1.2.3