gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r24240 - gnunet/src/util


From: gnunet
Subject: [GNUnet-SVN] r24240 - gnunet/src/util
Date: Tue, 9 Oct 2012 21:05:28 +0200

Author: grothoff
Date: 2012-10-09 21:05:28 +0200 (Tue, 09 Oct 2012)
New Revision: 24240

Modified:
   gnunet/src/util/program.c
Log:
-do not complain if ~/.gnunet/gnunet.conf does not exist, just use defaults

Modified: gnunet/src/util/program.c
===================================================================
--- gnunet/src/util/program.c   2012-10-09 18:46:25 UTC (rev 24239)
+++ gnunet/src/util/program.c   2012-10-09 19:05:28 UTC (rev 24240)
@@ -9,7 +9,7 @@
 
      GNUnet is distributed in the hope that it will be useful, but
      WITHOUT ANY WARRANTY; without even the implied warranty of
-     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPROSE.  See the GNU
      General Public License for more details.
 
      You should have received a copy of the GNU General Public License
@@ -240,7 +240,17 @@
     GNUNET_free (lpfx);
     return (ret == GNUNET_SYSERR) ? GNUNET_SYSERR : GNUNET_OK;
   }
-  (void) GNUNET_CONFIGURATION_load (cfg, cc.cfgfile);
+  if (GNUNET_YES ==
+      GNUNET_DISK_file_test (cc.cfgfile))
+    (void) GNUNET_CONFIGURATION_load (cfg, cc.cfgfile);
+  else
+  {
+    (void) GNUNET_CONFIGURATION_load (cfg, NULL);
+    if (0 != strcmp (cc.cfgfile, GNUNET_DEFAULT_USER_CONFIG_FILE))
+      GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                 _("Could not access configuration file `%s'\n"),
+                 cc.cfgfile);
+  }
   GNUNET_free (allopts);
   GNUNET_free (lpfx);
   if (GNUNET_OK ==




reply via email to

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