gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r21862 - gnunet/src/stream


From: gnunet
Subject: [GNUnet-SVN] r21862 - gnunet/src/stream
Date: Sun, 10 Jun 2012 21:07:16 +0200

Author: harsha
Date: 2012-06-10 21:07:16 +0200 (Sun, 10 Jun 2012)
New Revision: 21862

Modified:
   gnunet/src/stream/stream_api.c
Log:
-cleaner code

Modified: gnunet/src/stream/stream_api.c
===================================================================
--- gnunet/src/stream/stream_api.c      2012-06-10 17:41:44 UTC (rev 21861)
+++ gnunet/src/stream/stream_api.c      2012-06-10 19:07:16 UTC (rev 21862)
@@ -57,7 +57,7 @@
 /**
  * The maximum payload a data message packet can carry
  */
-static size_t max_payload_size = 
+static const size_t max_payload_size = 
   MAX_PACKET_SIZE - sizeof (struct GNUNET_STREAM_DataMessage);
 
 /**
@@ -2022,7 +2022,9 @@
   else
   {
     LOG (GNUNET_ERROR_TYPE_DEBUG,
-         "Client sent HELLO when in state %d\n", socket->state);
+         "%s: Client sent HELLO when in state %d\n", 
+         GNUNET_i2s (&socket->other_peer),
+         socket->state);
     /* FIXME: Send RESET? */
       
   }
@@ -2929,6 +2931,8 @@
   {
     LOG (GNUNET_ERROR_TYPE_WARNING,
         "Closing STREAM socket when a write handle is pending\n");
+    GNUNET_STREAM_io_write_cancel (socket->write_handle);
+    //socket->write_handle = NULL;
   }
 
   if (socket->read_task_id != GNUNET_SCHEDULER_NO_TASK)




reply via email to

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