gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r31305 - gnunet/src/util
Date: Thu, 12 Dec 2013 14:36:22 +0100

Author: wachs
Date: 2013-12-12 14:36:21 +0100 (Thu, 12 Dec 2013)
New Revision: 31305

Modified:
   gnunet/src/util/service.c
Log:
fail to start service if we have a malformed configuration


Modified: gnunet/src/util/service.c
===================================================================
--- gnunet/src/util/service.c   2013-12-12 13:07:28 UTC (rev 31304)
+++ gnunet/src/util/service.c   2013-12-12 13:36:21 UTC (rev 31305)
@@ -1441,12 +1441,24 @@
     HANDLE_ERROR;
   if (NULL == opt_cfg_fn)
     opt_cfg_fn = GNUNET_strdup (cfg_fn);
-  if (GNUNET_YES ==
-      GNUNET_DISK_file_test (opt_cfg_fn))
-    (void) GNUNET_CONFIGURATION_load (cfg, opt_cfg_fn);
+  if (GNUNET_YES == GNUNET_DISK_file_test (opt_cfg_fn))
+  {
+    if (GNUNET_SYSERR == GNUNET_CONFIGURATION_load (cfg, opt_cfg_fn))
+    {
+      GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                  _("Malformed configuration file `%s', exit ...\n"),
+                  opt_cfg_fn);
+      goto shutdown;
+    }
+  }
   else
   {
-    (void) GNUNET_CONFIGURATION_load (cfg, NULL);
+    if (GNUNET_SYSERR == GNUNET_CONFIGURATION_load (cfg, NULL))
+    {
+      GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                  _("Malformed configuration, exit ...\n"));
+      goto shutdown;
+    }
     if (0 != strcmp (opt_cfg_fn, cfg_fn))
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                  _("Could not access configuration file `%s'\n"),




reply via email to

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