gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r25369 - gnunet/src/fs


From: gnunet
Subject: [GNUnet-SVN] r25369 - gnunet/src/fs
Date: Mon, 10 Dec 2012 16:04:30 +0100

Author: grothoff
Date: 2012-12-10 16:04:30 +0100 (Mon, 10 Dec 2012)
New Revision: 25369

Modified:
   gnunet/src/fs/gnunet-service-fs_stream.c
Log:
-logging, initialize msize

Modified: gnunet/src/fs/gnunet-service-fs_stream.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_stream.c    2012-12-10 14:54:18 UTC (rev 
25368)
+++ gnunet/src/fs/gnunet-service-fs_stream.c    2012-12-10 15:04:30 UTC (rev 
25369)
@@ -1156,9 +1156,15 @@
   struct WriteQueueItem *wqi;
 
   if (NULL != sc->wh)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+               "Write pending, waiting for it to complete\n");
     return; /* write already pending */
+  }
   if (NULL == (wqi = sc->wqi_head))
   {
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+               "Write queue empty, reading more requests\n");
     continue_reading (sc);
     return;
   }
@@ -1173,6 +1179,8 @@
   GNUNET_free (wqi);
   if (NULL == sc->wh)
   {
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+               "Write failed; terminating stream\n");
     terminate_stream (sc);
     return;
   }
@@ -1233,6 +1241,7 @@
              "Starting transmission of %u byte reply via stream\n",
              (unsigned int) size);
   wqi = GNUNET_malloc (sizeof (struct WriteQueueItem) + msize);
+  wqi->msize = msize;
   srm = (struct StreamReplyMessage *) &wqi[1];
   srm->header.size = htons ((uint16_t) msize);
   srm->header.type = htons (GNUNET_MESSAGE_TYPE_FS_STREAM_REPLY);




reply via email to

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