[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r37042 - in gnunet/src: include util
From: |
gnunet |
Subject: |
[GNUnet-SVN] r37042 - in gnunet/src: include util |
Date: |
Sat, 16 Apr 2016 13:10:55 +0200 |
Author: grothoff
Date: 2016-04-16 13:10:55 +0200 (Sat, 16 Apr 2016)
New Revision: 37042
Modified:
gnunet/src/include/gnunet_constants.h
gnunet/src/include/gnunet_os_lib.h
gnunet/src/util/os_installation.c
gnunet/src/util/program.c
gnunet/src/util/service.c
Log:
support overriding GNUNET_DEFAULT_USER_CONFIG_FILE
Modified: gnunet/src/include/gnunet_constants.h
===================================================================
--- gnunet/src/include/gnunet_constants.h 2016-04-15 17:42:28 UTC (rev
37041)
+++ gnunet/src/include/gnunet_constants.h 2016-04-16 11:10:55 UTC (rev
37042)
@@ -41,11 +41,6 @@
#endif
/**
- * Last resort choice for configuration file name.
- */
-#define GNUNET_DEFAULT_USER_CONFIG_FILE "~/.config/gnunet.conf"
-
-/**
* Bandwidth (in/out) to assume initially (before either peer has
* communicated any particular preference). Should be rather low; set
* so that at least one maximum-size message can be send roughly once
Modified: gnunet/src/include/gnunet_os_lib.h
===================================================================
--- gnunet/src/include/gnunet_os_lib.h 2016-04-15 17:42:28 UTC (rev 37041)
+++ gnunet/src/include/gnunet_os_lib.h 2016-04-16 11:10:55 UTC (rev 37042)
@@ -255,6 +255,11 @@
*/
const char *config_file;
+ /**
+ * Configuration file name to use (if $XDG_CONFIG_HOME is not set).
+ */
+ const char *user_config_file;
+
};
Modified: gnunet/src/util/os_installation.c
===================================================================
--- gnunet/src/util/os_installation.c 2016-04-15 17:42:28 UTC (rev 37041)
+++ gnunet/src/util/os_installation.c 2016-04-16 11:10:55 UTC (rev 37042)
@@ -60,6 +60,8 @@
.env_varname = "GNUNET_PREFIX",
.bug_email = "address@hidden",
.homepage = "http://www.gnu.org/s/gnunet/",
+ .config_file = "gnunet.conf",
+ .user_config_file = "~/.config/gnunet.conf"
};
/**
Modified: gnunet/src/util/program.c
===================================================================
--- gnunet/src/util/program.c 2016-04-15 17:42:28 UTC (rev 37041)
+++ gnunet/src/util/program.c 2016-04-16 11:10:55 UTC (rev 37042)
@@ -225,7 +225,7 @@
DIR_SEPARATOR_STR,
GNUNET_OS_project_data_get ()->config_file);
else
- cfg_fn = GNUNET_strdup (GNUNET_DEFAULT_USER_CONFIG_FILE);
+ cfg_fn = GNUNET_strdup (GNUNET_OS_project_data_get ()->user_config_file);
lpfx = GNUNET_strdup (binaryName);
if (NULL != (spc = strstr (lpfx, " ")))
*spc = '\0';
Modified: gnunet/src/util/service.c
===================================================================
--- gnunet/src/util/service.c 2016-04-15 17:42:28 UTC (rev 37041)
+++ gnunet/src/util/service.c 2016-04-16 11:10:55 UTC (rev 37042)
@@ -1429,7 +1429,7 @@
DIR_SEPARATOR_STR,
GNUNET_OS_project_data_get ()->config_file);
else
- cfg_fn = GNUNET_strdup (GNUNET_DEFAULT_USER_CONFIG_FILE);
+ cfg_fn = GNUNET_strdup (GNUNET_OS_project_data_get ()->user_config_file);
memset (&sctx, 0, sizeof (sctx));
sctx.options = options;
sctx.ready_confirm_fd = -1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r37042 - in gnunet/src: include util,
gnunet <=