diff options
-rw-r--r-- | src/4a-hal-manager/4a-hal-manager-cb.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/4a-hal-manager/4a-hal-manager-cb.c b/src/4a-hal-manager/4a-hal-manager-cb.c index dd55eeb..396bab2 100644 --- a/src/4a-hal-manager/4a-hal-manager-cb.c +++ b/src/4a-hal-manager/4a-hal-manager-cb.c @@ -73,7 +73,7 @@ void HalMgrLoaded(afb_req_t request) struct HalMgrData *halMgrData; struct HalData *currentHalData; - json_object *requestJson, *requestAnswer, *apiRequestedInfoJ; + json_object *requestJson, *requestAnswer, *dependenciesJ, *apiRequestedInfoJ; apiHandle = afb_req_get_api(request); if(! apiHandle) { @@ -116,8 +116,14 @@ void HalMgrLoaded(afb_req_t request) else snprintf(cardIdString, sizeof(cardIdString), "not-found"); + dependenciesJ = HalUtlGetJsonArrayForAllDependencies(apiHandle, + ¤tHalData->internalHalData->probedDevicesList, + DEPENDENCY_COMPACT_JSON); + if(! dependenciesJ) + AFB_REQ_WARNING(request, "Didn't succeed to generate all dependencies compact json array"); + wrapRet = wrap_json_pack(&apiRequestedInfoJ, - "{s:s s:i s:s s:i s:s s:s s:s s:s s:s s:s}", + "{s:s s:i s:s s:i s:s s:s s:s s:s s:s s:s s?:o}", "api", currentHalData->apiName, "status", (int) currentHalData->status, "sndcard", currentHalData->sndCardPath, @@ -127,7 +133,8 @@ void HalMgrLoaded(afb_req_t request) "author", currentHalData->author ? currentHalData->author : "", "version", currentHalData->version ? currentHalData->version : "", "date", currentHalData->date ? currentHalData->date : "", - "snd-dev-id", cardIdString); + "snd-dev-id", cardIdString, + "dependencies", dependenciesJ); } // Case if request is empty or not handled else { |