summaryrefslogtreecommitdiffstats
path: root/plugins/alsa/alsa-api-streams.c
diff options
context:
space:
mode:
authorThierry Bultel <thierry.bultel@iot.bzh>2018-11-08 13:59:50 +0100
committerThierry Bultel <thierry.bultel@iot.bzh>2018-11-08 13:59:50 +0100
commita17d5239d2e72daa25a07a761fcece345701c7ff (patch)
tree363ea7f8934b3e2c1ceb1b8a7f3c4a66c49f450f /plugins/alsa/alsa-api-streams.c
parent92e0380860dbc556ef2a1f9fbc0cd7eb99edad69 (diff)
Fix the error string of attach actions
Fixes the "syntax-error" to something more explicit (SPEC-1906) Change-Id: I9d4c81ee1d62dcfb99799480c6dc910e2019a791 Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
Diffstat (limited to 'plugins/alsa/alsa-api-streams.c')
-rw-r--r--plugins/alsa/alsa-api-streams.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/alsa/alsa-api-streams.c b/plugins/alsa/alsa-api-streams.c
index 07d86d1..9a5c5c2 100644
--- a/plugins/alsa/alsa-api-streams.c
+++ b/plugins/alsa/alsa-api-streams.c
@@ -546,7 +546,7 @@ PUBLIC int ApiStreamAttach(SoftMixerT *mixer, AFB_ReqT request, const char *uid,
case json_type_object:
mixer->streams[index] = AttachOneStream(mixer, uid, prefix, argsJ);
if (!mixer->streams[index]) {
- AFB_ReqFailF(request, "invalid-syntax", "mixer=%s invalid stream= %s", mixer->uid, json_object_get_string(argsJ));
+ AFB_ReqFailF(request, "bad-stream", "mixer=%s invalid stream= %s", mixer->uid, json_object_get_string(argsJ));
goto OnErrorExit;
}
break;
@@ -566,7 +566,7 @@ PUBLIC int ApiStreamAttach(SoftMixerT *mixer, AFB_ReqT request, const char *uid,
mixer->streams[index + idx] = AttachOneStream(mixer, uid, prefix, streamJ);
if (!mixer->streams[index + idx]) {
AFB_ReqFailF(request,
- "invalid-syntax",
+ "bad-stream",
"%s: mixer=%s invalid stream= %s",
__func__, mixer->uid, json_object_get_string(streamJ));
goto OnErrorExit;
@@ -583,6 +583,6 @@ PUBLIC int ApiStreamAttach(SoftMixerT *mixer, AFB_ReqT request, const char *uid,
return 0;
OnErrorExit:
- printf("%s FAILED\n", __func__);
+ AFB_ApiError(mixer->api, "%s FAILED\n", __func__);
return -1;
}