diff options
author | Jonathan Aillet <jonathan.aillet@iot.bzh> | 2018-06-12 09:09:33 +0200 |
---|---|---|
committer | Jonathan Aillet <jonathan.aillet@iot.bzh> | 2018-10-08 15:53:43 +0200 |
commit | a78f724082be2b5a7beab7f8c2bbce2910481e45 (patch) | |
tree | fd67b9bb1aacfb48f90ed7580579d5168bb34b62 /4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c | |
parent | 340ff2dd0eb7c5d4b3d166e0f9fa29832d718b70 (diff) |
Revert "Move controller config exec before onload action"
This reverts commit 19080e452e5ae909f64e09a4edfe9c57fbac43a4.
Change-Id: I82c8f0a867a20995443f0cd600d5118ee9e3128d
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
Diffstat (limited to '4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c')
-rw-r--r-- | 4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c b/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c index 62c1e27..5a07baa 100644 --- a/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c +++ b/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c @@ -123,12 +123,12 @@ static int HalCtlsInitOneApi(AFB_ApiT apiHandle) // TBD JAI: handle refresh of hal status for dynamic card (/dev/by-id) - return 0; + return CtlConfigExec(apiHandle, ctrlConfig); } static int HalCtlsLoadOneApi(void *cbdata, AFB_ApiT apiHandle) { - int err = 0; + int err; CtlConfigT *ctrlConfig; if(! cbdata || ! apiHandle ) @@ -146,17 +146,13 @@ static int HalCtlsLoadOneApi(void *cbdata, AFB_ApiT apiHandle) } // Load section for corresponding Api - err += CtlLoadSections(apiHandle, ctrlConfig, ctrlSections); + err = CtlLoadSections(apiHandle, ctrlConfig, ctrlSections); // Declare an event manager for this Api afb_dynapi_on_event(apiHandle, HalCtlsDispatchApiEvent); // Init Api function (does not receive user closure ???) - afb_dynapi_on_init(apiHandle, NULL); - - err += HalCtlsInitOneApi(apiHandle); - - err += CtlConfigExec(apiHandle, ctrlConfig); + afb_dynapi_on_init(apiHandle, HalCtlsInitOneApi); return err; } |