diff options
author | Jonathan Aillet <jonathan.aillet@iot.bzh> | 2018-06-09 17:56:08 +0200 |
---|---|---|
committer | Jonathan Aillet <jonathan.aillet@iot.bzh> | 2018-10-08 15:52:51 +0200 |
commit | cfd7792c40232af1cb14ea4d0efd93bc8ca0d983 (patch) | |
tree | a1cd133a0dd2d65bb4f85320a5f58c1aea62b6ee /4a-hal/4a-hal-manager | |
parent | 957ccad167159cecf6fa7e33c75ec9692ce6af29 (diff) |
Change paramters in functions handling hal data
Change paramters in functions handling hal data structure.
Now, the only thing you need to add/search for/remove something in hal
data structure list is the address of the first element of the list
instead of the address of the whole hal manager data structure.
Change-Id: Iafa7428735c3aa418a6ef6564f9acde8f44e7dfe
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
Diffstat (limited to '4a-hal/4a-hal-manager')
-rw-r--r-- | 4a-hal/4a-hal-manager/4a-hal-manager-cb.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/4a-hal/4a-hal-manager/4a-hal-manager-cb.c b/4a-hal/4a-hal-manager/4a-hal-manager-cb.c index cdb50b7..f0ab0bd 100644 --- a/4a-hal/4a-hal-manager/4a-hal-manager-cb.c +++ b/4a-hal/4a-hal-manager/4a-hal-manager-cb.c @@ -90,7 +90,7 @@ void HalMgrLoaded(AFB_ReqT request) return; } - numberOfLoadedApi = HalUtlGetNumberOfHalInList(HalMgrGlobalData); + numberOfLoadedApi = HalUtlGetNumberOfHalInList(&HalMgrGlobalData->first); if(! numberOfLoadedApi) { AFB_ReqSuccess(request, NULL, "No Hal Api loaded"); return; @@ -191,7 +191,7 @@ void HalMgrLoad(AFB_ReqT request) return; } - addedHal = HalUtlAddHalApiToHalList(HalMgrGlobalData); + addedHal = HalUtlAddHalApiToHalList(&HalMgrGlobalData->first); addedHal->internal = false; // TBD JAI : initialize external to unavailable once event from external hal will be handled @@ -252,7 +252,7 @@ void HalMgrUnload(AFB_ReqT request) return; } - HalToRemove = HalUtlSearchHalDataByApiName(HalMgrGlobalData, apiName); + HalToRemove = HalUtlSearchHalDataByApiName(&HalMgrGlobalData->first, apiName); if(! HalToRemove) { AFB_ReqFail(request, "requested_api", "Can't find api to remove"); return; @@ -263,7 +263,7 @@ void HalMgrUnload(AFB_ReqT request) return; } - if(HalUtlRemoveSelectedHalFromList(HalMgrGlobalData, HalToRemove)) { + if(HalUtlRemoveSelectedHalFromList(&HalMgrGlobalData->first, HalToRemove)) { AFB_ReqFail(request, "unregister_error", "Didn't succeed to remove specified api"); return; } |