#include "fs.h"
#include "fs_tree.h"
-#define DEBUG_DOWNLOAD GNUNET_YES
+#define DEBUG_DOWNLOAD GNUNET_NO
/**
* We're storing the IBLOCKS after the
#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.
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,
&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,
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);
}
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,
#include "gnunet_arm_service.h"
#include "gnunet_fs_service.h"
-#define VERBOSE GNUNET_YES
+#define VERBOSE GNUNET_NO
#define START_ARM GNUNET_YES
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,
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);
[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