diff options
Diffstat (limited to '4a-hal/4a-hal-manager/4a-hal-manager.c')
-rw-r--r-- | 4a-hal/4a-hal-manager/4a-hal-manager.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/4a-hal/4a-hal-manager/4a-hal-manager.c b/4a-hal/4a-hal-manager/4a-hal-manager.c index 19f8e8a..0a75923 100644 --- a/4a-hal/4a-hal-manager/4a-hal-manager.c +++ b/4a-hal/4a-hal-manager/4a-hal-manager.c @@ -69,6 +69,7 @@ struct SpecificHalData **HalMngGetFirstHalData(void) static int HalMgrInitApi(AFB_ApiT apiHandle) { + struct SpecificHalData *currentCtlHalData; struct HalMgrData *HalMgrGlobalData; if(! apiHandle) @@ -85,6 +86,17 @@ static int HalMgrInitApi(AFB_ApiT apiHandle) if(HalUtlInitializeHalMgrData(apiHandle, HalMgrGlobalData, HAL_MANAGER_API_NAME, HAL_MANAGER_API_INFO)) return -3; + currentCtlHalData = HalMgrGlobalData->first; + + while(currentCtlHalData) { + if(! currentCtlHalData->apiName) + return -4; + else if(AFB_RequireApi(apiHandle, currentCtlHalData->apiName, 1)) + return -5; + + currentCtlHalData = currentCtlHalData->next; + } + return 0; } |