summaryrefslogtreecommitdiffstats
path: root/4a-hal
diff options
context:
space:
mode:
authorJonathan Aillet <jonathan.aillet@iot.bzh>2018-06-03 19:09:11 +0200
committerJonathan Aillet <jonathan.aillet@iot.bzh>2018-10-08 15:51:00 +0200
commit70108117e5f392eff2710d5d6a0cd04e400e4cde (patch)
tree6992774133d0a554090147b8d25639818b6c7705 /4a-hal
parent8bbaffadc1a5bcfc9b14174793f034565baecb52 (diff)
Generate an error when mixer initialization fails
Generate an error when mixer initialization is correctly transfered to mixer api but an error was raised by it. Change-Id: I617686b0167f9fb536ec56e430d10560e7f7ca31 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
Diffstat (limited to '4a-hal')
-rw-r--r--4a-hal/4a-hal-controllers/4a-hal-controllers-cb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/4a-hal/4a-hal-controllers/4a-hal-controllers-cb.c b/4a-hal/4a-hal-controllers/4a-hal-controllers-cb.c
index 9b4ba26..b37000d 100644
--- a/4a-hal/4a-hal-controllers/4a-hal-controllers-cb.c
+++ b/4a-hal/4a-hal-controllers/4a-hal-controllers-cb.c
@@ -258,12 +258,12 @@ void HalCtlsInitMixer(afb_request *request)
}
else if(json_object_object_get_ex(returnJ, "response", &toReturnJ)) {
err = HalCtlsHandleMixerAttachResponse(request, &currentCtlHalData->ctlHalSpecificData->ctlHalStreamsData, toReturnJ);
- if(err) {
- afb_request_success_f(request,
- toReturnJ,
- "Seems that create call to api %s succeed but this warning was rised by response decoder : %i",
- apiToCall,
- err);
+ if(err != (int) MIXER_NO_ERROR) {
+ afb_request_fail_f(request,
+ "handler_mixer_response",
+ "Seems that create call to api %s succeed but this warning was rised by response decoder : %i",
+ apiToCall,
+ err);
return;
}