gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r10184 - gnunet/src/fs
Date: Mon, 1 Feb 2010 15:15:34 +0100

Author: grothoff
Date: 2010-02-01 15:15:34 +0100 (Mon, 01 Feb 2010)
New Revision: 10184

Modified:
   gnunet/src/fs/fs_download.c
   gnunet/src/fs/gnunet-service-fs.c
   gnunet/src/fs/gnunet-service-fs_drq.c
   gnunet/src/fs/test_fs_download.c
   gnunet/src/fs/test_fs_download_data.conf
Log:
fixes

Modified: gnunet/src/fs/fs_download.c
===================================================================
--- gnunet/src/fs/fs_download.c 2010-02-01 13:55:28 UTC (rev 10183)
+++ gnunet/src/fs/fs_download.c 2010-02-01 14:15:34 UTC (rev 10184)
@@ -36,7 +36,7 @@
 #include "fs.h"
 #include "fs_tree.h"
 
-#define DEBUG_DOWNLOAD GNUNET_YES
+#define DEBUG_DOWNLOAD GNUNET_NO
 
 /**
  * We're storing the IBLOCKS after the

Modified: gnunet/src/fs/gnunet-service-fs.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs.c   2010-02-01 13:55:28 UTC (rev 10183)
+++ gnunet/src/fs/gnunet-service-fs.c   2010-02-01 14:15:34 UTC (rev 10184)
@@ -46,7 +46,7 @@
 #include "gnunet-service-fs_indexing.h"
 #include "fs.h"
 
-#define DEBUG_FS GNUNET_YES
+#define DEBUG_FS GNUNET_NO
 
 /**
  * Maximum number of outgoing messages we queue per peer.
@@ -1918,6 +1918,9 @@
   pr->drq = NULL;
   if (NULL == key)
     {
+      if (pr->client_request_list != NULL)
+       GNUNET_SERVER_receive_done 
(pr->client_request_list->client_list->client, 
+                                   GNUNET_YES);
       /* no more results */
       if (pr->task == GNUNET_SCHEDULER_NO_TASK)
        pr->task = GNUNET_SCHEDULER_add_now (sched,
@@ -2347,8 +2350,10 @@
                                     &sm->query,
                                     pr,
                                     
GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
+  if (type == GNUNET_DATASTORE_BLOCKTYPE_DBLOCK)
+    type = GNUNET_DATASTORE_BLOCKTYPE_ANY; /* get on-demand blocks too! */
   pr->drq = GNUNET_FS_drq_get (&sm->query,
-                              pr->type,                               
+                              type,                           
                               &process_local_reply,
                               pr,
                               GNUNET_TIME_UNIT_FOREVER_REL,

Modified: gnunet/src/fs/gnunet-service-fs_drq.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_drq.c       2010-02-01 13:55:28 UTC (rev 
10183)
+++ gnunet/src/fs/gnunet-service-fs_drq.c       2010-02-01 14:15:34 UTC (rev 
10184)
@@ -144,9 +144,7 @@
                  const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   struct DatastoreRequestQueue *e = cls;
-
-  GNUNET_CONTAINER_DLL_remove (drq_head, drq_tail, e);
-  drq_running = e;
+  
   e->req (e->req_cls, GNUNET_YES);
 }
 
@@ -165,6 +163,8 @@
   e = drq_head;
   if (e == NULL)
     return;
+  GNUNET_CONTAINER_DLL_remove (drq_head, drq_tail, e);
+  drq_running = e;
   GNUNET_SCHEDULER_cancel (sched, e->task);
   e->task = GNUNET_SCHEDULER_add_now (sched,
                                      &run_next_request,

Modified: gnunet/src/fs/test_fs_download.c
===================================================================
--- gnunet/src/fs/test_fs_download.c    2010-02-01 13:55:28 UTC (rev 10183)
+++ gnunet/src/fs/test_fs_download.c    2010-02-01 14:15:34 UTC (rev 10184)
@@ -29,7 +29,7 @@
 #include "gnunet_arm_service.h"
 #include "gnunet_fs_service.h"
 
-#define VERBOSE GNUNET_YES
+#define VERBOSE GNUNET_NO
 
 #define START_ARM GNUNET_YES
 
@@ -143,7 +143,7 @@
       break;
     case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
       printf ("Publishing complete, %llu kbps.\n",
-             (unsigned long long) (FILESIZE * 1000 / 
(1+GNUNET_TIME_absolute_get_duration (start).value) / 1024));
+             (unsigned long long) (FILESIZE * 1000LL / 
(1+GNUNET_TIME_absolute_get_duration (start).value) / 1024LL));
       fn = GNUNET_DISK_mktemp ("gnunet-download-test-dst");
       start = GNUNET_TIME_absolute_get ();
       download = GNUNET_FS_download_start (fs,
@@ -160,7 +160,7 @@
       break;
     case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED:
       printf ("Download complete,  %llu kbps.\n",
-             (unsigned long long) (FILESIZE * 1000 / 
(1+GNUNET_TIME_absolute_get_duration (start).value) / 1024));
+             (unsigned long long) (FILESIZE * 1000LL / 
(1+GNUNET_TIME_absolute_get_duration (start).value) / 1024LL));
       GNUNET_SCHEDULER_add_now (sched,
                                &abort_download_task,
                                NULL);

Modified: gnunet/src/fs/test_fs_download_data.conf
===================================================================
--- gnunet/src/fs/test_fs_download_data.conf    2010-02-01 13:55:28 UTC (rev 
10183)
+++ gnunet/src/fs/test_fs_download_data.conf    2010-02-01 14:15:34 UTC (rev 
10184)
@@ -36,9 +36,9 @@
 [fs]
 PORT = 42471
 HOSTNAME = localhost
-DEBUG = YES
-PREFIX = valgrind --tool=memcheck --leak-check=yes
-BINARY = /home/grothoff/bin/gnunet-service-fs
+#DEBUG = YES
+#PREFIX = valgrind --tool=memcheck --leak-check=yes
+#BINARY = /home/grothoff/bin/gnunet-service-fs
 
 [testing]
 WEAKRANDOM = YES





reply via email to

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