diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-03-04 22:16:13 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-03-04 22:16:13 +0000 |
commit | 826d0b5c3deef513a4053342382a149ff844d004 (patch) | |
tree | 2b64dc1fb6a512dccd20417d487eafece5f54782 | |
parent | 3470bccc502785d3b4a5c8702afaf78a16114fb0 (diff) | |
download | gnunet-826d0b5c3deef513a4053342382a149ff844d004.tar.gz gnunet-826d0b5c3deef513a4053342382a149ff844d004.zip |
-use sane defaults
-rw-r--r-- | src/fs/fs_api.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/fs/fs_api.c b/src/fs/fs_api.c index 81a95c997..0efbc7964 100644 --- a/src/fs/fs_api.c +++ b/src/fs/fs_api.c | |||
@@ -30,6 +30,15 @@ | |||
30 | #include "fs_api.h" | 30 | #include "fs_api.h" |
31 | #include "fs_tree.h" | 31 | #include "fs_tree.h" |
32 | 32 | ||
33 | /** | ||
34 | * How many block requests can we have outstanding in parallel at a time by default? | ||
35 | */ | ||
36 | #define DEFAULT_MAX_PARALLEL_REQUESTS (1024 * 10) | ||
37 | |||
38 | /** | ||
39 | * How many downloads can we have outstanding in parallel at a time by default? | ||
40 | */ | ||
41 | #define DEFAULT_MAX_PARALLEL_DOWNLOADS 16 | ||
33 | 42 | ||
34 | /** | 43 | /** |
35 | * Start the given job (send signal, remove from pending queue, update | 44 | * Start the given job (send signal, remove from pending queue, update |
@@ -2795,8 +2804,8 @@ GNUNET_FS_start (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
2795 | ret->upcb = upcb; | 2804 | ret->upcb = upcb; |
2796 | ret->upcb_cls = upcb_cls; | 2805 | ret->upcb_cls = upcb_cls; |
2797 | ret->flags = flags; | 2806 | ret->flags = flags; |
2798 | ret->max_parallel_downloads = 1; | 2807 | ret->max_parallel_downloads = DEFAULT_MAX_PARALLEL_DOWNLOADS; |
2799 | ret->max_parallel_requests = 1; | 2808 | ret->max_parallel_requests = DEFAULT_MAX_PARALLEL_REQUESTS; |
2800 | ret->avg_block_latency = GNUNET_TIME_UNIT_MINUTES; /* conservative starting point */ | 2809 | ret->avg_block_latency = GNUNET_TIME_UNIT_MINUTES; /* conservative starting point */ |
2801 | va_start (ap, flags); | 2810 | va_start (ap, flags); |
2802 | while (GNUNET_FS_OPTIONS_END != (opt = va_arg (ap, enum GNUNET_FS_OPTIONS))) | 2811 | while (GNUNET_FS_OPTIONS_END != (opt = va_arg (ap, enum GNUNET_FS_OPTIONS))) |