summaryrefslogtreecommitdiff
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)
-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,
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;
}