diff options
author | Jonathan Aillet <jonathan.aillet@iot.bzh> | 2018-06-11 20:49:01 +0200 |
---|---|---|
committer | Jonathan Aillet <jonathan.aillet@iot.bzh> | 2018-10-08 15:52:51 +0200 |
commit | 3611753da97f29fc1342ac33a34a25f79acdc672 (patch) | |
tree | 1ce164fb290538b5b9ba5ae98111efb79aacc782 /4a-hal/4a-hal-controllers/4a-hal-controllers-mixer-link.c | |
parent | 4e05b191805c728fb2208bce4491eb322681b0c9 (diff) |
Print some errors in info verbs
Print errors info when an error happen during call to mixer 'info' verb.
Change-Id: Ic3b0b6312743af3ba41a7868d1347ce6b0fcc8cd
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
Diffstat (limited to '4a-hal/4a-hal-controllers/4a-hal-controllers-mixer-link.c')
-rw-r--r-- | 4a-hal/4a-hal-controllers/4a-hal-controllers-mixer-link.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/4a-hal/4a-hal-controllers/4a-hal-controllers-mixer-link.c b/4a-hal/4a-hal-controllers/4a-hal-controllers-mixer-link.c index 600b119..059a2ac 100644 --- a/4a-hal/4a-hal-controllers/4a-hal-controllers-mixer-link.c +++ b/4a-hal/4a-hal-controllers/4a-hal-controllers-mixer-link.c @@ -281,10 +281,8 @@ int HalCtlsAttachToMixer(AFB_ApiT apiHandle) return 0; } -int HalCtlsGetInfoFromMixer(AFB_ApiT apiHandle, char *apiToCall, json_object *requestJson, json_object **toReturnJ) +int HalCtlsGetInfoFromMixer(AFB_ApiT apiHandle, char *apiToCall, json_object *requestJson, json_object **toReturnJ, char **returnedStatus, char **returnedInfo) { - char *returnedStatus = NULL, *returnedInfo = NULL; - enum CallError returnedError; json_object *returnJ, *responseJ; @@ -305,14 +303,14 @@ int HalCtlsGetInfoFromMixer(AFB_ApiT apiHandle, char *apiToCall, json_object *re } if(AFB_ServiceSync(apiHandle, apiToCall, MIXER_INFO_VERB, json_object_get(requestJson), &returnJ)) { - returnedError = HalUtlHandleAppFwCallError(apiHandle, apiToCall, MIXER_INFO_VERB, returnJ, &returnedStatus, &returnedInfo); + returnedError = HalUtlHandleAppFwCallError(apiHandle, apiToCall, MIXER_INFO_VERB, returnJ, returnedStatus, returnedInfo); AFB_ApiError(apiHandle, "Error %i during call to verb %s of %s api with status '%s' and info '%s'", (int) returnedError, apiToCall, MIXER_INFO_VERB, - returnedStatus ? returnedStatus : "not returned", - returnedInfo ? returnedInfo : "not returned"); + *returnedStatus ? *returnedStatus : "not returned", + *returnedInfo ? *returnedInfo : "not returned"); return -4; } else if(json_object_object_get_ex(returnJ, "response", &responseJ)) { |