aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-06-12 17:41:12 +0200
committerChristian Grothoff <christian@grothoff.org>2022-06-12 17:41:17 +0200
commit14da59e43311204cadc883cd3688be08bd77b6a8 (patch)
tree16706eaef03c72c957e7e6a956cdf696c563d91f
parent839640c0e7262a65b66299a922eb6fd67732cc4f (diff)
downloadgnunet-14da59e43311204cadc883cd3688be08bd77b6a8.tar.gz
gnunet-14da59e43311204cadc883cd3688be08bd77b6a8.zip
-fix endianess conversion for url_counter
-rw-r--r--src/hello/hello-uri.c4
1 files 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,
572 env = GNUNET_MQ_msg_extra (msg, 572 env = GNUNET_MQ_msg_extra (msg,
573 blen, 573 blen,
574 GNUNET_MESSAGE_TYPE_HELLO_URI); 574 GNUNET_MESSAGE_TYPE_HELLO_URI);
575 msg->url_counter = htonl ((uint16_t) builder->a_length); 575 msg->url_counter = htons ((uint16_t) builder->a_length);
576 GNUNET_assert (GNUNET_OK == 576 GNUNET_assert (GNUNET_OK ==
577 GNUNET_HELLO_builder_to_block (builder, 577 GNUNET_HELLO_builder_to_block (builder,
578 priv, 578 priv,
@@ -625,7 +625,7 @@ GNUNET_HELLO_builder_to_dht_hello_msg (
625 msg->sig = block->sig; 625 msg->sig = block->sig;
626 msg->expiration_time = block->expiration_time; 626 msg->expiration_time = block->expiration_time;
627 } 627 }
628 msg->url_counter = htonl ((uint16_t) builder->a_length); 628 msg->url_counter = htons ((uint16_t) builder->a_length);
629 return &msg->header; 629 return &msg->header;
630} 630}
631 631