diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-02-01 14:15:34 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-02-01 14:15:34 +0000 |
commit | 42a0353260b0f1cf7f7d00f47399bfbc53e34bad (patch) | |
tree | 432ff8e3b6f005fd796be641a6ce5ef1cec93fab /src/fs | |
parent | 8f30685560bfd084d681aa3a9470002479bcff80 (diff) | |
download | gnunet-42a0353260b0f1cf7f7d00f47399bfbc53e34bad.tar.gz gnunet-42a0353260b0f1cf7f7d00f47399bfbc53e34bad.zip |
fixes
Diffstat (limited to 'src/fs')
-rw-r--r-- | src/fs/fs_download.c | 2 | ||||
-rw-r--r-- | src/fs/gnunet-service-fs.c | 9 | ||||
-rw-r--r-- | src/fs/gnunet-service-fs_drq.c | 6 | ||||
-rw-r--r-- | src/fs/test_fs_download.c | 6 | ||||
-rw-r--r-- | src/fs/test_fs_download_data.conf | 6 |
5 files changed, 17 insertions, 12 deletions
diff --git a/src/fs/fs_download.c b/src/fs/fs_download.c index 78ab5c814..289599471 100644 --- a/src/fs/fs_download.c +++ b/src/fs/fs_download.c | |||
@@ -36,7 +36,7 @@ | |||
36 | #include "fs.h" | 36 | #include "fs.h" |
37 | #include "fs_tree.h" | 37 | #include "fs_tree.h" |
38 | 38 | ||
39 | #define DEBUG_DOWNLOAD GNUNET_YES | 39 | #define DEBUG_DOWNLOAD GNUNET_NO |
40 | 40 | ||
41 | /** | 41 | /** |
42 | * We're storing the IBLOCKS after the | 42 | * We're storing the IBLOCKS after the |
diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c index 30d15eb66..93123c8d8 100644 --- a/src/fs/gnunet-service-fs.c +++ b/src/fs/gnunet-service-fs.c | |||
@@ -46,7 +46,7 @@ | |||
46 | #include "gnunet-service-fs_indexing.h" | 46 | #include "gnunet-service-fs_indexing.h" |
47 | #include "fs.h" | 47 | #include "fs.h" |
48 | 48 | ||
49 | #define DEBUG_FS GNUNET_YES | 49 | #define DEBUG_FS GNUNET_NO |
50 | 50 | ||
51 | /** | 51 | /** |
52 | * Maximum number of outgoing messages we queue per peer. | 52 | * Maximum number of outgoing messages we queue per peer. |
@@ -1918,6 +1918,9 @@ process_local_reply (void *cls, | |||
1918 | pr->drq = NULL; | 1918 | pr->drq = NULL; |
1919 | if (NULL == key) | 1919 | if (NULL == key) |
1920 | { | 1920 | { |
1921 | if (pr->client_request_list != NULL) | ||
1922 | GNUNET_SERVER_receive_done (pr->client_request_list->client_list->client, | ||
1923 | GNUNET_YES); | ||
1921 | /* no more results */ | 1924 | /* no more results */ |
1922 | if (pr->task == GNUNET_SCHEDULER_NO_TASK) | 1925 | if (pr->task == GNUNET_SCHEDULER_NO_TASK) |
1923 | pr->task = GNUNET_SCHEDULER_add_now (sched, | 1926 | pr->task = GNUNET_SCHEDULER_add_now (sched, |
@@ -2347,8 +2350,10 @@ handle_start_search (void *cls, | |||
2347 | &sm->query, | 2350 | &sm->query, |
2348 | pr, | 2351 | pr, |
2349 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE); | 2352 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE); |
2353 | if (type == GNUNET_DATASTORE_BLOCKTYPE_DBLOCK) | ||
2354 | type = GNUNET_DATASTORE_BLOCKTYPE_ANY; /* get on-demand blocks too! */ | ||
2350 | pr->drq = GNUNET_FS_drq_get (&sm->query, | 2355 | pr->drq = GNUNET_FS_drq_get (&sm->query, |
2351 | pr->type, | 2356 | type, |
2352 | &process_local_reply, | 2357 | &process_local_reply, |
2353 | pr, | 2358 | pr, |
2354 | GNUNET_TIME_UNIT_FOREVER_REL, | 2359 | GNUNET_TIME_UNIT_FOREVER_REL, |
diff --git a/src/fs/gnunet-service-fs_drq.c b/src/fs/gnunet-service-fs_drq.c index afca9d970..27db8263d 100644 --- a/src/fs/gnunet-service-fs_drq.c +++ b/src/fs/gnunet-service-fs_drq.c | |||
@@ -144,9 +144,7 @@ run_next_request (void *cls, | |||
144 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 144 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
145 | { | 145 | { |
146 | struct DatastoreRequestQueue *e = cls; | 146 | struct DatastoreRequestQueue *e = cls; |
147 | 147 | ||
148 | GNUNET_CONTAINER_DLL_remove (drq_head, drq_tail, e); | ||
149 | drq_running = e; | ||
150 | e->req (e->req_cls, GNUNET_YES); | 148 | e->req (e->req_cls, GNUNET_YES); |
151 | } | 149 | } |
152 | 150 | ||
@@ -165,6 +163,8 @@ next_ds_request () | |||
165 | e = drq_head; | 163 | e = drq_head; |
166 | if (e == NULL) | 164 | if (e == NULL) |
167 | return; | 165 | return; |
166 | GNUNET_CONTAINER_DLL_remove (drq_head, drq_tail, e); | ||
167 | drq_running = e; | ||
168 | GNUNET_SCHEDULER_cancel (sched, e->task); | 168 | GNUNET_SCHEDULER_cancel (sched, e->task); |
169 | e->task = GNUNET_SCHEDULER_add_now (sched, | 169 | e->task = GNUNET_SCHEDULER_add_now (sched, |
170 | &run_next_request, | 170 | &run_next_request, |
diff --git a/src/fs/test_fs_download.c b/src/fs/test_fs_download.c index d4b32b8c8..3968068e4 100644 --- a/src/fs/test_fs_download.c +++ b/src/fs/test_fs_download.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include "gnunet_arm_service.h" | 29 | #include "gnunet_arm_service.h" |
30 | #include "gnunet_fs_service.h" | 30 | #include "gnunet_fs_service.h" |
31 | 31 | ||
32 | #define VERBOSE GNUNET_YES | 32 | #define VERBOSE GNUNET_NO |
33 | 33 | ||
34 | #define START_ARM GNUNET_YES | 34 | #define START_ARM GNUNET_YES |
35 | 35 | ||
@@ -143,7 +143,7 @@ progress_cb (void *cls, | |||
143 | break; | 143 | break; |
144 | case GNUNET_FS_STATUS_PUBLISH_COMPLETED: | 144 | case GNUNET_FS_STATUS_PUBLISH_COMPLETED: |
145 | printf ("Publishing complete, %llu kbps.\n", | 145 | printf ("Publishing complete, %llu kbps.\n", |
146 | (unsigned long long) (FILESIZE * 1000 / (1+GNUNET_TIME_absolute_get_duration (start).value) / 1024)); | 146 | (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).value) / 1024LL)); |
147 | fn = GNUNET_DISK_mktemp ("gnunet-download-test-dst"); | 147 | fn = GNUNET_DISK_mktemp ("gnunet-download-test-dst"); |
148 | start = GNUNET_TIME_absolute_get (); | 148 | start = GNUNET_TIME_absolute_get (); |
149 | download = GNUNET_FS_download_start (fs, | 149 | download = GNUNET_FS_download_start (fs, |
@@ -160,7 +160,7 @@ progress_cb (void *cls, | |||
160 | break; | 160 | break; |
161 | case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED: | 161 | case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED: |
162 | printf ("Download complete, %llu kbps.\n", | 162 | printf ("Download complete, %llu kbps.\n", |
163 | (unsigned long long) (FILESIZE * 1000 / (1+GNUNET_TIME_absolute_get_duration (start).value) / 1024)); | 163 | (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).value) / 1024LL)); |
164 | GNUNET_SCHEDULER_add_now (sched, | 164 | GNUNET_SCHEDULER_add_now (sched, |
165 | &abort_download_task, | 165 | &abort_download_task, |
166 | NULL); | 166 | NULL); |
diff --git a/src/fs/test_fs_download_data.conf b/src/fs/test_fs_download_data.conf index 5e13cd530..d575f4f8c 100644 --- a/src/fs/test_fs_download_data.conf +++ b/src/fs/test_fs_download_data.conf | |||
@@ -36,9 +36,9 @@ HOSTNAME = localhost | |||
36 | [fs] | 36 | [fs] |
37 | PORT = 42471 | 37 | PORT = 42471 |
38 | HOSTNAME = localhost | 38 | HOSTNAME = localhost |
39 | DEBUG = YES | 39 | #DEBUG = YES |
40 | PREFIX = valgrind --tool=memcheck --leak-check=yes | 40 | #PREFIX = valgrind --tool=memcheck --leak-check=yes |
41 | BINARY = /home/grothoff/bin/gnunet-service-fs | 41 | #BINARY = /home/grothoff/bin/gnunet-service-fs |
42 | 42 | ||
43 | [testing] | 43 | [testing] |
44 | WEAKRANDOM = YES | 44 | WEAKRANDOM = YES |