aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/transport/plugin_transport_tcp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c
index 5dc7b4dc0..af35d5a74 100644
--- a/src/transport/plugin_transport_tcp.c
+++ b/src/transport/plugin_transport_tcp.c
@@ -568,7 +568,7 @@ do_transmit (void *cls, size_t size, void *buf)
568 { 568 {
569 if (pm->is_welcome) 569 if (pm->is_welcome)
570 { 570 {
571 if (size < (msize = htons (pm->msg->size))) 571 if (size < (msize = ntohs (pm->msg->size)))
572 break; 572 break;
573 memcpy (cbuf, pm->msg, msize); 573 memcpy (cbuf, pm->msg, msize);
574 cbuf += msize; 574 cbuf += msize;
@@ -578,7 +578,7 @@ do_transmit (void *cls, size_t size, void *buf)
578 else 578 else
579 { 579 {
580 if (size < 580 if (size <
581 sizeof (struct DataMessage) + (msize = htons (pm->msg->size))) 581 sizeof (struct DataMessage) + (msize = ntohs (pm->msg->size)))
582 break; 582 break;
583 dm = (struct DataMessage *) cbuf; 583 dm = (struct DataMessage *) cbuf;
584 dm->header.size = htons (sizeof (struct DataMessage) + msize); 584 dm->header.size = htons (sizeof (struct DataMessage) + msize);
@@ -627,7 +627,7 @@ process_pending_messages (struct Session *session)
627 return; 627 return;
628 session->transmit_handle 628 session->transmit_handle
629 = GNUNET_SERVER_notify_transmit_ready (session->client, 629 = GNUNET_SERVER_notify_transmit_ready (session->client,
630 htons (session-> 630 ntohs (session->
631 pending_messages->msg-> 631 pending_messages->msg->
632 size) + 632 size) +
633 (session-> 633 (session->