diff options
author | Jonathan Aillet <jonathan.aillet@iot.bzh> | 2018-06-15 21:06:01 +0200 |
---|---|---|
committer | Jonathan Aillet <jonathan.aillet@iot.bzh> | 2018-10-08 15:53:53 +0200 |
commit | e03602c2b5dbd867adc39aed78258e51ca53a7b2 (patch) | |
tree | 3d6ec0983aeeef031f190ff8b9150fd742e75dc9 /4a-hal/4a-hal-controllers/4a-hal-controllers-cb.c | |
parent | ddf7309d11eb277dd81e519290211293df737bc9 (diff) |
Correct the request return when calling a stream
Correct the request return when someone tries to execute an action on
a stream.
Now, it is successfull if the mixer says so even if no response
object was returned.
Change-Id: Iee965db3e826ed9040c4b2bf50eaf9090584c1bc
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
Diffstat (limited to '4a-hal/4a-hal-controllers/4a-hal-controllers-cb.c')
-rw-r--r-- | 4a-hal/4a-hal-controllers/4a-hal-controllers-cb.c | 16 |
1 files changed, 8 insertions, 8 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 acf3ce0..474ea70 100644 --- a/4a-hal/4a-hal-controllers/4a-hal-controllers-cb.c +++ b/4a-hal/4a-hal-controllers/4a-hal-controllers-cb.c @@ -439,19 +439,19 @@ void HalCtlsActionOnCall(AFB_ReqT request) HalUtlHandleAppFwCallErrorInRequest(request, apiToCall, currentMixerData->verbToCall, returnJ, "call_action"); } else if(wrap_json_unpack(returnJ, "{s:o}", "response", &toReturnJ)) { - AFB_ReqFailF(request, - "invalid_response", - "%s: Seems that %s call to api %s succeed, but response is not valid : '%s'", - __func__, - MIXER_ATTACH_VERB, - apiToCall, - json_object_get_string(returnJ)); + AFB_ReqSuccessF(request, + returnJ, + "%s: Seems that %s call to api %s succeed, but no response was found : '%s'", + __func__, + currentMixerData->verbToCall, + apiToCall, + json_object_get_string(returnJ)); } else { AFB_ReqSuccessF(request, toReturnJ, "Action %s correctly transferred to %s without any error raised", - MIXER_ATTACH_VERB, + currentMixerData->verbToCall, apiToCall); } } |