From 4b71feef879087c7dcc04ba79482affe329b64ff Mon Sep 17 00:00:00 2001 From: Gautham Kuppuswamy Date: Wed, 26 Jun 2024 14:06:29 -0400 Subject: [PATCH 1/2] Return error when last config file is non existent or has some error Signed-off-by: Gautham Kuppuswamy --- c/configmgr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/c/configmgr.c b/c/configmgr.c index a2c49bd5b..460ff60c8 100644 --- a/c/configmgr.c +++ b/c/configmgr.c @@ -827,6 +827,9 @@ static int overloadConfiguration(ConfigManager *mgr, trace(mgr, DEBUG2, "at end of config path\n"); bool dontCare = false; config->configData = readJson(mgr,config,pathElement,&dontCare); + if ((config->configData == NULL) && !dontCare){ + return ZCFG_MISSING_CONFIG_SOURCE; + } trace(mgr, DEBUG2, "mgr->config = 0x%p\n", config); return 0; /* success */ } else { From 78e946141710ad75e3d851938baf1f9e8246da46 Mon Sep 17 00:00:00 2001 From: Gautham Kuppuswamy Date: Wed, 26 Jun 2024 15:02:33 -0400 Subject: [PATCH 2/2] Changelog updated Signed-off-by: Gautham Kuppuswamy --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 48b28cf58..70dac3cd7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Bugfix: fix an incorrect check in the recovery router code which might lead to the state cell-pool being released prematurely (#446) - Allocating SLH for http server with configurable value 'httpRequestHeapMaxBlocks' in yaml (#447). +- Return error when last config file is non existent or has some error (#460). ## `2.16.0` - No yaml value converted to null (#442)