[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r12149 - gnunet/src/fs
From: |
gnunet |
Subject: |
[GNUnet-SVN] r12149 - gnunet/src/fs |
Date: |
Sat, 3 Jul 2010 15:58:02 +0200 |
Author: grothoff
Date: 2010-07-03 15:58:02 +0200 (Sat, 03 Jul 2010)
New Revision: 12149
Modified:
gnunet/src/fs/fs_download.c
gnunet/src/fs/test_fs_download_data.conf
Log:
fixing off-by-one
Modified: gnunet/src/fs/fs_download.c
===================================================================
--- gnunet/src/fs/fs_download.c 2010-07-03 06:53:33 UTC (rev 12148)
+++ gnunet/src/fs/fs_download.c 2010-07-03 13:58:02 UTC (rev 12149)
@@ -395,6 +395,17 @@
&transmit_download_request,
dc);
}
+ else
+ {
+#if DEBUG_DOWNLOAD
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Transmission request not issued (%p %p)\n",
+ dc->th,
+ dc->client);
+#endif
+
+ }
+
}
@@ -1234,7 +1245,7 @@
msize = 0;
sm = buf;
while ( (dc->pending != NULL) &&
- (size > msize + sizeof (struct SearchMessage)) )
+ (size >= msize + sizeof (struct SearchMessage)) )
{
#if DEBUG_DOWNLOAD
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -1391,6 +1402,10 @@
struct GNUNET_FS_DownloadContext *dc = cls;
struct GNUNET_FS_ProgressInfo pi;
+#if DEBUG_DOWNLOAD
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Download activated\n");
+#endif
GNUNET_assert (NULL != client);
GNUNET_assert (dc->client == NULL);
GNUNET_assert (dc->th == NULL);
@@ -1404,12 +1419,17 @@
GNUNET_CONTAINER_multihashmap_iterate (dc->active,
&retry_entry,
dc);
+#if DEBUG_DOWNLOAD
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Asking for transmission to FS service\n");
+#endif
dc->th = GNUNET_CLIENT_notify_transmit_ready (dc->client,
sizeof (struct SearchMessage),
GNUNET_CONSTANTS_SERVICE_TIMEOUT,
GNUNET_NO,
&transmit_download_request,
dc);
+ GNUNET_assert (dc->th != NULL);
}
@@ -1423,7 +1443,11 @@
{
struct GNUNET_FS_DownloadContext *dc = cls;
struct GNUNET_FS_ProgressInfo pi;
-
+
+#if DEBUG_DOWNLOAD
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Download deactivated\n");
+#endif
if (NULL != dc->th)
{
GNUNET_CLIENT_notify_transmit_ready_cancel (dc->th);
Modified: gnunet/src/fs/test_fs_download_data.conf
===================================================================
--- gnunet/src/fs/test_fs_download_data.conf 2010-07-03 06:53:33 UTC (rev
12148)
+++ gnunet/src/fs/test_fs_download_data.conf 2010-07-03 13:58:02 UTC (rev
12149)
@@ -19,7 +19,7 @@
DEFAULTSERVICES =
[datastore]
-# DEBUG = YES
+#DEBUG = YES
[statistics]
PORT = 42467
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r12149 - gnunet/src/fs,
gnunet <=