gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r9917 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r9917 - gnunet/src/transport
Date: Tue, 29 Dec 2009 05:12:20 +0100

Author: amatus
Date: 2009-12-29 05:12:20 +0100 (Tue, 29 Dec 2009)
New Revision: 9917

Modified:
   gnunet/src/transport/plugin_transport_tcp.c
Log:
Use ntohs where appropriate.


Modified: gnunet/src/transport/plugin_transport_tcp.c
===================================================================
--- gnunet/src/transport/plugin_transport_tcp.c 2009-12-27 19:20:26 UTC (rev 
9916)
+++ gnunet/src/transport/plugin_transport_tcp.c 2009-12-29 04:12:20 UTC (rev 
9917)
@@ -568,7 +568,7 @@
     {
       if (pm->is_welcome)
         {
-          if (size < (msize = htons (pm->msg->size)))
+          if (size < (msize = ntohs (pm->msg->size)))
             break;
           memcpy (cbuf, pm->msg, msize);
           cbuf += msize;
@@ -578,7 +578,7 @@
       else
         {
           if (size <
-              sizeof (struct DataMessage) + (msize = htons (pm->msg->size)))
+              sizeof (struct DataMessage) + (msize = ntohs (pm->msg->size)))
             break;
           dm = (struct DataMessage *) cbuf;
           dm->header.size = htons (sizeof (struct DataMessage) + msize);
@@ -627,7 +627,7 @@
     return;
   session->transmit_handle
     = GNUNET_SERVER_notify_transmit_ready (session->client,
-                                           htons (session->
+                                           ntohs (session->
                                                   pending_messages->msg->
                                                   size) +
                                            (session->





reply via email to

[Prev in Thread] Current Thread [Next in Thread]