gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] 03/04: util: check return value on config file load and handle


From: gnunet
Subject: [gnunet] 03/04: util: check return value on config file load and handle error
Date: Mon, 30 Sep 2024 11:56:05 +0200

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

commit 3679dc2de9631dad054d3c7b30aa6fba906a7a24
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Mon Sep 30 11:55:34 2024 +0200

    util: check return value on config file load and handle error
---
 src/lib/util/configuration_helper.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/lib/util/configuration_helper.c 
b/src/lib/util/configuration_helper.c
index d4d5fc732..d1836f106 100644
--- a/src/lib/util/configuration_helper.c
+++ b/src/lib/util/configuration_helper.c
@@ -121,8 +121,13 @@ GNUNET_CONFIGURATION_config_tool_run (
     /* Re-parse the configuration with diagnostics enabled. */
     ncfg = GNUNET_CONFIGURATION_create ();
     GNUNET_CONFIGURATION_enable_diagnostics (ncfg);
-    GNUNET_CONFIGURATION_load (ncfg,
-                               cfgfile);
+    if (GNUNET_OK != GNUNET_CONFIGURATION_load (ncfg,
+                                                cfgfile))
+    {
+      fprintf (stderr,
+               _("Failed to load config file `%s'"), cfgfile);
+      return;
+    }
     cfg = ncfg;
   }
 

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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