gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r20254 - gnunet-gtk/src/fs


From: gnunet
Subject: [GNUnet-SVN] r20254 - gnunet-gtk/src/fs
Date: Sun, 4 Mar 2012 23:16:30 +0100

Author: grothoff
Date: 2012-03-04 23:16:30 +0100 (Sun, 04 Mar 2012)
New Revision: 20254

Added:
   gnunet-gtk/src/fs/gnunet-fs-gtk.conf
Modified:
   gnunet-gtk/src/fs/Makefile.am
   gnunet-gtk/src/fs/gnunet-fs-gtk.c
Log:
-use sane defaults

Modified: gnunet-gtk/src/fs/Makefile.am
===================================================================
--- gnunet-gtk/src/fs/Makefile.am       2012-03-04 22:16:13 UTC (rev 20253)
+++ gnunet-gtk/src/fs/Makefile.am       2012-03-04 22:16:30 UTC (rev 20254)
@@ -38,4 +38,9 @@
 gnunet_fs_gtk_LDFLAGS = \
   -export-dynamic 
 
-EXTRA_DIST = metatypes.c
+pkgcfg_DATA = \
+  gnunet-fs-gtk.conf
+
+EXTRA_DIST = metatypes.c \
+ $(pkgcfg_DATA)
+

Modified: gnunet-gtk/src/fs/gnunet-fs-gtk.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk.c   2012-03-04 22:16:13 UTC (rev 20253)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk.c   2012-03-04 22:16:30 UTC (rev 20254)
@@ -27,7 +27,19 @@
 #include "gnunet-fs-gtk_common.h"
 #include "gnunet-fs-gtk_event-handler.h"
 
+
 /**
+ * How many block requests can we have outstanding in parallel at a time by 
default?
+ */
+#define DEFAULT_MAX_PARALLEL_REQUESTS 100000
+
+/**
+ * How many downloads can we have outstanding in parallel at a time by default?
+ */
+#define DEFAULT_MAX_PARALLEL_DOWNLOADS 128
+
+
+/**
  * Should gnunet-fs-gtk start in tray mode?
  */
 static int tray_only;
@@ -275,12 +287,12 @@
   /* FIXME: should these '1's be here? Maybe better to put them into
    * default config files?
    */
-  if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (main_context->cfg, 
"gnunet-gtk",
+  if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (main_context->cfg, 
"gnunet-fs-gtk",
       "MAX_PARALLEL_DOWNLOADS", &dl_parallel))
-    dl_parallel = 1;
-  if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (main_context->cfg, 
"gnunet-gtk",
+    dl_parallel = DEFAULT_MAX_PARALLEL_DOWNLOADS;
+  if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (main_context->cfg, 
"gnunet-fs-gtk",
       "MAX_PARALLEL_REQUESTS", &req_parallel))
-    req_parallel = 1;
+    req_parallel = DEFAULT_MAX_PARALLEL_REQUESTS;
 
   /* initialize file-sharing */
   fs = GNUNET_FS_start (main_context->cfg, "gnunet-fs-gtk",

Added: gnunet-gtk/src/fs/gnunet-fs-gtk.conf
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk.conf                                (rev 0)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk.conf        2012-03-04 22:16:30 UTC (rev 
20254)
@@ -0,0 +1,3 @@
+[gnunet-fs-gtk]
+MAX_PARALLEL_DOWNLOADS = 128
+MAX_PARALLEL_REQUESTS = 100000
\ No newline at end of file




reply via email to

[Prev in Thread] Current Thread [Next in Thread]