diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-11-24 23:45:27 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-11-24 23:45:27 +0000 |
commit | c345383f56aa7d7da19fcd129ab0974c16ed92bc (patch) | |
tree | 7de83a21b8562653602430736b7ecf3cdb09eba0 /src/fs/gnunet-service-fs.c | |
parent | 5a9231ed9630c600cc2da70354692d74fe66329d (diff) | |
download | gnunet-c345383f56aa7d7da19fcd129ab0974c16ed92bc.tar.gz gnunet-c345383f56aa7d7da19fcd129ab0974c16ed92bc.zip |
actually using stream for dblock/iblock transfer if possible
Diffstat (limited to 'src/fs/gnunet-service-fs.c')
-rw-r--r-- | src/fs/gnunet-service-fs.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c index 37f020806..b48531d16 100644 --- a/src/fs/gnunet-service-fs.c +++ b/src/fs/gnunet-service-fs.c | |||
@@ -22,9 +22,6 @@ | |||
22 | * @file fs/gnunet-service-fs.c | 22 | * @file fs/gnunet-service-fs.c |
23 | * @brief gnunet anonymity protocol implementation | 23 | * @brief gnunet anonymity protocol implementation |
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | * | ||
26 | * To use: | ||
27 | * - consider re-issue GSF_dht_lookup_ after non-DHT reply received | ||
28 | */ | 25 | */ |
29 | #include "platform.h" | 26 | #include "platform.h" |
30 | #include <float.h> | 27 | #include <float.h> |
@@ -397,7 +394,26 @@ start_p2p_processing (void *cls, struct GSF_PendingRequest *pr, | |||
397 | GSF_pending_request_cancel_ (pr, GNUNET_YES); | 394 | GSF_pending_request_cancel_ (pr, GNUNET_YES); |
398 | return; | 395 | return; |
399 | } | 396 | } |
400 | GSF_dht_lookup_ (pr); | 397 | if (0 == prd->anonymity_level) |
398 | { | ||
399 | switch (prd->type) | ||
400 | { | ||
401 | case GNUNET_BLOCK_TYPE_FS_DBLOCK: | ||
402 | case GNUNET_BLOCK_TYPE_FS_IBLOCK: | ||
403 | /* the above block types MAY be available via 'stream' */ | ||
404 | GSF_stream_lookup_ (pr); | ||
405 | break; | ||
406 | case GNUNET_BLOCK_TYPE_FS_KBLOCK: | ||
407 | case GNUNET_BLOCK_TYPE_FS_SBLOCK: | ||
408 | case GNUNET_BLOCK_TYPE_FS_NBLOCK: | ||
409 | /* the above block types are in the DHT */ | ||
410 | GSF_dht_lookup_ (pr); | ||
411 | break; | ||
412 | default: | ||
413 | GNUNET_break (0); | ||
414 | break; | ||
415 | } | ||
416 | } | ||
401 | consider_forwarding (NULL, pr, result); | 417 | consider_forwarding (NULL, pr, result); |
402 | } | 418 | } |
403 | 419 | ||