diff options
author | Jonathan Aillet <jonathan.aillet@iot.bzh> | 2019-07-17 12:09:34 +0200 |
---|---|---|
committer | Jonathan Aillet <jonathan.aillet@iot.bzh> | 2019-07-17 12:09:34 +0200 |
commit | 5a5d52285f32811215c2ffce280c2ac55a5b8599 (patch) | |
tree | 113252c9667e0cafc67472e4c3a36e0cabb792dd | |
parent | 0d0e561b703ca0f62f23a187cd4a7555ddc33f78 (diff) |
Correct a return in 'CtlConfigExec' functionhalibut_8.0.3halibut_8.0.2halibut_8.0.1halibut_8.0.0halibut/8.0.3halibut/8.0.2halibut/8.0.1halibut/8.0.08.0.38.0.28.0.18.0.0
Avoid a 'return -0' when an error has been caught during first
section callback execution.
Bug-AGL: SPEC-2568
Change-Id: Ic407f8be0afd0236b1880b6c33e5339470f68b33
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
-rw-r--r-- | ctl-lib/ctl-config.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ctl-lib/ctl-config.c b/ctl-lib/ctl-config.c index cd89bc0..2970955 100644 --- a/ctl-lib/ctl-config.c +++ b/ctl-lib/ctl-config.c @@ -163,7 +163,7 @@ int CtlConfigExec(afb_api_t apiHandle, CtlConfigT *ctlConfig) { error = ctlConfig->sections[idx].loadCB(apiHandle, &ctlConfig->sections[idx], NULL); if (error < 0) { AFB_API_ERROR(apiHandle, "Error %i caught during call to '%s' section callback", error, ctlConfig->sections[idx].key); - return -idx; + return -(idx + 1); } else if (error > 0) { AFB_API_WARNING(apiHandle, "Warning %i raised during call to '%s' section callback", error, ctlConfig->sections[idx].key); |