aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-03-04 22:16:30 +0000
committerChristian Grothoff <christian@grothoff.org>2012-03-04 22:16:30 +0000
commit399052619137a7dd9316775c6437506a9dd09864 (patch)
tree7f9d6129ed2fe2d389643a7bbde2868d736e297e
parent074129ecfe41b8d78d52df7215a775455329a354 (diff)
downloadgnunet-gtk-399052619137a7dd9316775c6437506a9dd09864.tar.gz
gnunet-gtk-399052619137a7dd9316775c6437506a9dd09864.zip
-use sane defaults
-rw-r--r--src/fs/Makefile.am7
-rw-r--r--src/fs/gnunet-fs-gtk.c20
-rw-r--r--src/fs/gnunet-fs-gtk.conf3
3 files changed, 25 insertions, 5 deletions
diff --git a/src/fs/Makefile.am b/src/fs/Makefile.am
index 6404f4ae..61d21968 100644
--- a/src/fs/Makefile.am
+++ b/src/fs/Makefile.am
@@ -38,4 +38,9 @@ gnunet_fs_gtk_LDADD = \
38gnunet_fs_gtk_LDFLAGS = \ 38gnunet_fs_gtk_LDFLAGS = \
39 -export-dynamic 39 -export-dynamic
40 40
41EXTRA_DIST = metatypes.c 41pkgcfg_DATA = \
42 gnunet-fs-gtk.conf
43
44EXTRA_DIST = metatypes.c \
45 $(pkgcfg_DATA)
46
diff --git a/src/fs/gnunet-fs-gtk.c b/src/fs/gnunet-fs-gtk.c
index 6a39aa7a..415f142c 100644
--- a/src/fs/gnunet-fs-gtk.c
+++ b/src/fs/gnunet-fs-gtk.c
@@ -27,6 +27,18 @@
27#include "gnunet-fs-gtk_common.h" 27#include "gnunet-fs-gtk_common.h"
28#include "gnunet-fs-gtk_event-handler.h" 28#include "gnunet-fs-gtk_event-handler.h"
29 29
30
31/**
32 * How many block requests can we have outstanding in parallel at a time by default?
33 */
34#define DEFAULT_MAX_PARALLEL_REQUESTS 100000
35
36/**
37 * How many downloads can we have outstanding in parallel at a time by default?
38 */
39#define DEFAULT_MAX_PARALLEL_DOWNLOADS 128
40
41
30/** 42/**
31 * Should gnunet-fs-gtk start in tray mode? 43 * Should gnunet-fs-gtk start in tray mode?
32 */ 44 */
@@ -275,12 +287,12 @@ run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
275 /* FIXME: should these '1's be here? Maybe better to put them into 287 /* FIXME: should these '1's be here? Maybe better to put them into
276 * default config files? 288 * default config files?
277 */ 289 */
278 if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (main_context->cfg, "gnunet-gtk", 290 if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (main_context->cfg, "gnunet-fs-gtk",
279 "MAX_PARALLEL_DOWNLOADS", &dl_parallel)) 291 "MAX_PARALLEL_DOWNLOADS", &dl_parallel))
280 dl_parallel = 1; 292 dl_parallel = DEFAULT_MAX_PARALLEL_DOWNLOADS;
281 if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (main_context->cfg, "gnunet-gtk", 293 if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (main_context->cfg, "gnunet-fs-gtk",
282 "MAX_PARALLEL_REQUESTS", &req_parallel)) 294 "MAX_PARALLEL_REQUESTS", &req_parallel))
283 req_parallel = 1; 295 req_parallel = DEFAULT_MAX_PARALLEL_REQUESTS;
284 296
285 /* initialize file-sharing */ 297 /* initialize file-sharing */
286 fs = GNUNET_FS_start (main_context->cfg, "gnunet-fs-gtk", 298 fs = GNUNET_FS_start (main_context->cfg, "gnunet-fs-gtk",
diff --git a/src/fs/gnunet-fs-gtk.conf b/src/fs/gnunet-fs-gtk.conf
new file mode 100644
index 00000000..db99fa63
--- /dev/null
+++ b/src/fs/gnunet-fs-gtk.conf
@@ -0,0 +1,3 @@
1[gnunet-fs-gtk]
2MAX_PARALLEL_DOWNLOADS = 128
3MAX_PARALLEL_REQUESTS = 100000 \ No newline at end of file