[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r1997 - in GNUnet/src: applications/sqstore_mysql conf incl
From: |
grothoff |
Subject: |
[GNUnet-SVN] r1997 - in GNUnet/src: applications/sqstore_mysql conf include util |
Date: |
Sun, 28 Aug 2005 01:21:13 -0700 (PDT) |
Author: grothoff
Date: 2005-08-28 01:21:11 -0700 (Sun, 28 Aug 2005)
New Revision: 1997
Modified:
GNUnet/src/applications/sqstore_mysql/mysql.c
GNUnet/src/conf/gnunet-setup.c
GNUnet/src/conf/wizard_interface.c
GNUnet/src/include/gnunet_util.h
GNUnet/src/util/configuration.c
Log:
sync
Modified: GNUnet/src/applications/sqstore_mysql/mysql.c
===================================================================
--- GNUnet/src/applications/sqstore_mysql/mysql.c 2005-08-28 08:20:56 UTC
(rev 1996)
+++ GNUnet/src/applications/sqstore_mysql/mysql.c 2005-08-28 08:21:11 UTC
(rev 1997)
@@ -114,7 +114,7 @@
* EFFICIENCY ISSUES
*
* If you suffer from too slow index/insert speeds,
- * you might try to define /etc/gnunet.conf option
+ * you might try to define /etc/gnunetd.conf option
*
* [MYSQL]
* DELAYED = YES
Modified: GNUnet/src/conf/gnunet-setup.c
===================================================================
--- GNUnet/src/conf/gnunet-setup.c 2005-08-28 08:20:56 UTC (rev 1996)
+++ GNUnet/src/conf/gnunet-setup.c 2005-08-28 08:21:11 UTC (rev 1997)
@@ -125,20 +125,20 @@
if(daemon) {
FREENONNULL(setConfigurationString("GNUNETD", "_MAGIC_", "YES"));
if(filename == NULL) {
- if(0 == ACCESS("/etc/gnunetd.conf", W_OK) ||
- (errno == ENOENT && 0 == ACCESS("/etc", W_OK)))
- filename = STRDUP("/etc/gnunetd.conf");
+ if(0 == ACCESS(DEFAULT_DAEMON_CONFIG_FILE, W_OK) ||
+ (errno == ENOENT && 0 == ACCESS(DEFAULT_DAEMON_DIR, W_OK)))
+ filename = STRDUP(DEFAULT_DAEMON_CONFIG_FILE);
else {
- if(0 == ACCESS("/var/lib", W_OK))
- mkdirp("/var/lib/GNUnet");
- if(0 == ACCESS("/var/lib/GNUnet/gnunetd.conf", W_OK) ||
- (errno == ENOENT && 0 == ACCESS("/var/lib/GNUnet", W_OK)))
- filename = STRDUP("/var/lib/GNUnet/gnunetd.conf");
+ if(0 == ACCESS(VAR_DIRECTORY, W_OK))
+ mkdirp(VAR_DAEMON_DIRECTORY);
+ if(0 == ACCESS(VAR_DAEMON_CONFIG_FILE, W_OK) ||
+ (errno == ENOENT && 0 == ACCESS(VAR_DAEMON_DIRECTORY, W_OK)))
+ filename = STRDUP(VAR_DAEMON_CONFIG_FILE);
else {
- dirname = expandFileName("~/.gnunet/");
+ dirname = expandFileName(GNUNET_HOME_DIRECTORY);
mkdirp(dirname);
FREE(dirname);
- filename = expandFileName("~/.gnunet/gnunetd.conf");
+ filename = expandFileName(HOME_DAEMON_CONFIG_FILE);
}
}
}
@@ -148,10 +148,10 @@
else {
FREENONNULL(setConfigurationString("GNUNETD", "_MAGIC_", "NO"));
if(filename == NULL) {
- dirname = expandFileName("~/.gnunet/");
+ dirname = expandFileName(GNUNET_HOME_DIRECTORY);
mkdirp(dirname);
FREE(dirname);
- filename = expandFileName("~/.gnunet/gnunet.conf");
+ filename = expandFileName(DEFAULT_CLIENT_CONFIG_FILE);
}
FREENONNULL(setConfigurationString("FILES", "gnunet.conf", filename));
conf_parse(DATADIR "/config-client.in");
Modified: GNUnet/src/conf/wizard_interface.c
===================================================================
--- GNUnet/src/conf/wizard_interface.c 2005-08-28 08:20:56 UTC (rev 1996)
+++ GNUnet/src/conf/wizard_interface.c 2005-08-28 08:21:11 UTC (rev 1997)
@@ -74,7 +74,7 @@
gtk_text_buffer_set_text (gtk_text_view_get_buffer
(GTK_TEXT_VIEW (textview11)),
_
- ("Welcome to GNUnet!\n\nThis assistant will ask you
a few basic questions in order to configure GNUnet.\n\nPlease visit our
homepage at\n\thttp://www.gnunet.org\nand join our community
at\n\thttp://www.gnunet.org/drupal/\n\nHave a lot of fun,\n\nthe GNUnet team"),
+ ("Welcome to GNUnet!\n\nThis assistant will ask you
a few basic questions in order to configure GNUnet.\n\nPlease visit our
homepage at\n\thttp://gnunet.org\nand join our community
at\n\thttps://gnunet.org/drupal/\n\nHave a lot of fun,\n\nthe GNUnet team"),
-1);
hseparator2 = gtk_hseparator_new ();
Modified: GNUnet/src/include/gnunet_util.h
===================================================================
--- GNUnet/src/include/gnunet_util.h 2005-08-28 08:20:56 UTC (rev 1996)
+++ GNUnet/src/include/gnunet_util.h 2005-08-28 08:21:11 UTC (rev 1997)
@@ -64,7 +64,6 @@
* especially the least significant bits may change
* frequently, even between different SVN versions.
*/
-
#define GNUNET_UTIL_VERSION 0x00070000
/**
@@ -128,9 +127,13 @@
* @brief Default names of the configuration files.
*/
#define DEFAULT_CLIENT_CONFIG_FILE "~/.gnunet/gnunet.conf"
-#define DEFAULT_DAEMON_CONFIG_FILE "/etc/gnunet.conf"
-#define VAR_DAEMON_CONFIG_FILE "/var/lib/GNUnet/gnunet.conf"
-#define HOME_DAEMON_CONFIG_FILE "~/.gnunet/gnunet.root"
+#define DEFAULT_DAEMON_DIR "/etc"
+#define DEFAULT_DAEMON_CONFIG_FILE "/etc/gnunetd.conf"
+#define VAR_DIRECTORY "/var/lib"
+#define VAR_DAEMON_DIRECTORY "/var/lib/GNUnet"
+#define VAR_DAEMON_CONFIG_FILE "/var/lib/GNUnet/gnunetd.conf"
+#define HOME_DAEMON_CONFIG_FILE "~/.gnunet/gnunetd.conf"
+#define GNUNET_HOME_DIRECTORY "~/.gnunet/"
/**
* @brief Length of RSA encrypted data (2048 bit)
Modified: GNUnet/src/util/configuration.c
===================================================================
--- GNUnet/src/util/configuration.c 2005-08-28 08:20:56 UTC (rev 1996)
+++ GNUnet/src/util/configuration.c 2005-08-28 08:21:11 UTC (rev 1997)
@@ -460,23 +460,22 @@
if (testConfigurationString("GNUNETD",
"_MAGIC_",
"YES")) {
- eName = expandFileName("~/.gnunet/gnunetd.conf");
+ eName = expandFileName(HOME_DAEMON_CONFIG_FILE);
expCfgName = getenv("GNUNETD_CONFIG");
if (expCfgName == NULL) {
/* pick default, but try to pick it so
that we can write there (if it does not
exist) */
- expCfgName = "/etc/gnunetd.conf";
+ expCfgName = DEFAULT_DAEMON_CONFIG_FILE;
if (ACCESS(expCfgName, R_OK)) {
- expCfgName = "/var/lib/GNUnet/gnunetd.conf";
+ expCfgName = VAR_DAEMON_CONFIG_FILE;
if (ACCESS(expCfgName, R_OK)) {
expCfgName = eName;
if (ACCESS(expCfgName, R_OK)) {
- if (0 == ACCESS("/etc/gnunetd.conf", W_OK))
- expCfgName = "/etc/gnunetd.conf";
- mkdirp("/var/lib/GNUnet");
- if (0 == ACCESS("/var/lib/GNUnet/gnunetd.conf", W_OK))
- expCfgName = "/var/lib/GNUnet/gnunetd.conf";
+ if (0 == ACCESS(DEFAULT_DAEMON_CONFIG_FILE, W_OK))
+ expCfgName = DEFAULT_DAEMON_CONFIG_FILE;
+ if (0 == ACCESS(VAR_DAEMON_CONFIG_FILE, W_OK))
+ expCfgName = VAR_DAEMON_CONFIG_FILE;
if (0 == ACCESS(eName, W_OK))
expCfgName = eName;
}
@@ -484,7 +483,7 @@
}
}
} else {
- eName = expandFileName("~/.gnunet/gnunet.conf");
+ eName = expandFileName(DEFAULT_CLIENT_CONFIG_FILE);
expCfgName = getenv("GNUNET_CONFIG");
if (expCfgName == NULL)
expCfgName = eName;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r1997 - in GNUnet/src: applications/sqstore_mysql conf include util,
grothoff <=