diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-10-09 19:05:28 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-10-09 19:05:28 +0000 |
commit | 9467d5e5eeb21e85a6f481eecb24ccaa5fe83396 (patch) | |
tree | d63cbbaf6f99d4b5f1b14efdb384af34d1e301f3 /src | |
parent | cb58dc6ce7f7ae53a67a4563985bf4987a7179d9 (diff) | |
download | gnunet-9467d5e5eeb21e85a6f481eecb24ccaa5fe83396.tar.gz gnunet-9467d5e5eeb21e85a6f481eecb24ccaa5fe83396.zip |
-do not complain if ~/.gnunet/gnunet.conf does not exist, just use defaults
Diffstat (limited to 'src')
-rw-r--r-- | src/util/program.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/util/program.c b/src/util/program.c index 6045f59cf..4985995b4 100644 --- a/src/util/program.c +++ b/src/util/program.c | |||
@@ -9,7 +9,7 @@ | |||
9 | 9 | ||
10 | GNUnet is distributed in the hope that it will be useful, but | 10 | GNUnet is distributed in the hope that it will be useful, but |
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPROSE. See the GNU |
13 | General Public License for more details. | 13 | General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
@@ -240,7 +240,17 @@ GNUNET_PROGRAM_run2 (int argc, char *const *argv, const char *binaryName, | |||
240 | GNUNET_free (lpfx); | 240 | GNUNET_free (lpfx); |
241 | return (ret == GNUNET_SYSERR) ? GNUNET_SYSERR : GNUNET_OK; | 241 | return (ret == GNUNET_SYSERR) ? GNUNET_SYSERR : GNUNET_OK; |
242 | } | 242 | } |
243 | (void) GNUNET_CONFIGURATION_load (cfg, cc.cfgfile); | 243 | if (GNUNET_YES == |
244 | GNUNET_DISK_file_test (cc.cfgfile)) | ||
245 | (void) GNUNET_CONFIGURATION_load (cfg, cc.cfgfile); | ||
246 | else | ||
247 | { | ||
248 | (void) GNUNET_CONFIGURATION_load (cfg, NULL); | ||
249 | if (0 != strcmp (cc.cfgfile, GNUNET_DEFAULT_USER_CONFIG_FILE)) | ||
250 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
251 | _("Could not access configuration file `%s'\n"), | ||
252 | cc.cfgfile); | ||
253 | } | ||
244 | GNUNET_free (allopts); | 254 | GNUNET_free (allopts); |
245 | GNUNET_free (lpfx); | 255 | GNUNET_free (lpfx); |
246 | if (GNUNET_OK == | 256 | if (GNUNET_OK == |