summaryrefslogtreecommitdiffstats
path: root/4a-hal/4a-hal-manager/4a-hal-manager-cb.c
diff options
context:
space:
mode:
authorJonathan Aillet <jonathan.aillet@iot.bzh>2019-03-05 15:47:38 +0100
committerJonathan Aillet <jonathan.aillet@iot.bzh>2019-05-22 16:31:59 +0200
commit196e723e79a1f5eae41cf4a8b1450df0679a4af8 (patch)
tree6f2a37c49e1a4211d6b34a1e1efa586276b68cb1 /4a-hal/4a-hal-manager/4a-hal-manager-cb.c
parentbea6bdb2e661b1de821a65e338f57f9e7d2f5c0a (diff)
Clarify use of linked list
Clarify use of linked list by renaming some variables and functions. BUG-AGL: SPEC-2329 Change-Id: I21ada0b2914c99dfeecfcb6b55c8976dee1a0cd7 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
Diffstat (limited to '4a-hal/4a-hal-manager/4a-hal-manager-cb.c')
-rw-r--r--4a-hal/4a-hal-manager/4a-hal-manager-cb.c9
1 files changed, 5 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 f919afe..77ae52f 100644
--- a/4a-hal/4a-hal-manager/4a-hal-manager-cb.c
+++ b/4a-hal/4a-hal-manager/4a-hal-manager-cb.c
@@ -77,7 +77,7 @@ void HalMgrLoaded(afb_req_t request)
return;
}
- currentHalData = HalMgrGlobalData->first;
+ currentHalData = HalMgrGlobalData->halDataList;
if(! currentHalData) {
afb_req_success(request, NULL, "No Hal Api loaded");
@@ -174,7 +174,7 @@ void HalMgrLoad(afb_req_t request)
return;
}
- addedHal = HalUtlAddHalApiToHalList(&HalMgrGlobalData->first);
+ addedHal = HalUtlAddHalApiToHalList(&HalMgrGlobalData->halDataList);
addedHal->internal = 0;
// TBD JAI : initialize external to unavailable once event from external hal will be handled
@@ -232,7 +232,8 @@ void HalMgrUnload(afb_req_t request)
return;
}
- if(! (HalToRemove = HalUtlSearchHalDataByApiName(&HalMgrGlobalData->first, apiName))) {
+ HalToRemove = HalUtlSearchHalDataByApiName(&HalMgrGlobalData->halDataList, apiName);
+ if(! HalToRemove) {
afb_req_fail(request, "requested_api", "Can't find api to remove");
return;
}
@@ -242,7 +243,7 @@ void HalMgrUnload(afb_req_t request)
return;
}
- if(HalUtlRemoveSelectedHalFromList(&HalMgrGlobalData->first, HalToRemove)) {
+ if(HalUtlRemoveSelectedHalFromList(&HalMgrGlobalData->halDataList, HalToRemove)) {
afb_req_fail(request, "unregister_error", "Didn't succeed to remove specified api");
return;
}