[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] 01/02: -fix: variable size in test
From: |
gnunet |
Subject: |
[gnunet] 01/02: -fix: variable size in test |
Date: |
Mon, 06 Jul 2020 15:57:55 +0200 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository gnunet.
commit 50f16c6a4fe992ab25637fb80a67b9d4e59b789a
Author: Martin Schanzenbach <mschanzenbach@posteo.de>
AuthorDate: Mon Jul 6 14:36:28 2020 +0200
-fix: variable size in test
---
src/transport/gnunet-service-transport.c | 4 ++--
src/transport/transport_api_core.c | 5 +++--
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/transport/gnunet-service-transport.c
b/src/transport/gnunet-service-transport.c
index 9bdcd64be..207c17f2f 100644
--- a/src/transport/gnunet-service-transport.c
+++ b/src/transport/gnunet-service-transport.c
@@ -727,9 +727,9 @@ handle_send_transmit_continuation (void *cls,
stcc->uuid);
send_ok_msg.header.size = htons (sizeof(send_ok_msg));
send_ok_msg.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_OK);
- send_ok_msg.bytes_msg = htonl (bytes_payload);
+ send_ok_msg.bytes_msg = htons (bytes_payload);
send_ok_msg.bytes_physical = htonl (bytes_on_wire);
- send_ok_msg.success = htonl (success);
+ send_ok_msg.success = htons (success);
send_ok_msg.peer = stcc->target;
unicast (stcc->tc, &send_ok_msg.header, GNUNET_NO);
}
diff --git a/src/transport/transport_api_core.c
b/src/transport/transport_api_core.c
index 55647508d..7d4b415bd 100644
--- a/src/transport/transport_api_core.c
+++ b/src/transport/transport_api_core.c
@@ -622,13 +622,14 @@ handle_send_ok (void *cls, const struct SendOkMessage
*okm)
struct Neighbour *n;
uint32_t bytes_msg;
uint32_t bytes_physical;
+ uint16_t success = ntohs (okm->success);
- bytes_msg = ntohl (okm->bytes_msg);
+ bytes_msg = ntohs (okm->bytes_msg);
bytes_physical = ntohl (okm->bytes_physical);
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Receiving SEND_OK message, transmission to %s %s.\n",
GNUNET_i2s (&okm->peer),
- ntohl (okm->success) == GNUNET_OK ? "succeeded" : "failed");
+ success == GNUNET_OK ? "succeeded" : "failed");
n = neighbour_find (h, &okm->peer);
if (NULL == n)
{
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.