summaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2020-07-06 14:36:28 +0200
committerMartin Schanzenbach <mschanzenbach@posteo.de>2020-07-06 14:36:28 +0200
commit50f16c6a4fe992ab25637fb80a67b9d4e59b789a (patch)
tree3a08b6df103df86d1d220b30705aaa03322cb3e0 /src/transport
parent03943a61c9d876f4ea32c9f4875ddd4b46a186af (diff)
-fix: variable size in test
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/gnunet-service-transport.c4
-rw-r--r--src/transport/transport_api_core.c5
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)
{