aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/alsa/alsa-api-sink.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-13 14:34:02 +0100
commit109036431c4bde92c67105a6044616a4c035d82c (patch)
tree9e6ae0bc6282689e9175e5d79f079c8a4e820678 /plugins/alsa/alsa-api-sink.c
parent6ee71f44ebbb19809c75fb3b2ec4ca184b6e60fd (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-sink.c')
-rw-r--r--plugins/alsa/alsa-api-sink.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/alsa/alsa-api-sink.c b/plugins/alsa/alsa-api-sink.c
index c8ad727..96437f5 100644
--- a/plugins/alsa/alsa-api-sink.c
+++ b/plugins/alsa/alsa-api-sink.c
@@ -74,7 +74,7 @@ PUBLIC int ApiSinkAttach(SoftMixerT *mixer, AFB_ReqT request, const char *uid, j
case json_type_object:
mixer->sinks[index] = ApiPcmAttachOne(mixer, uid, SND_PCM_STREAM_PLAYBACK, argsJ);
if (!mixer->sinks[index]) {
- AFB_ReqFailF(request, "invalid-syntax", "mixer=%s invalid sink= %s", mixer->uid, json_object_get_string(argsJ));
+ AFB_ReqFailF(request, "bad-pcm", "mixer=%s invalid sink= %s", mixer->uid, json_object_get_string(argsJ));
goto OnErrorExit;
}
@@ -101,7 +101,7 @@ PUBLIC int ApiSinkAttach(SoftMixerT *mixer, AFB_ReqT request, const char *uid, j
json_object *sinkJ = json_object_array_get_idx(argsJ, idx);
AlsaSndPcmT * pcm = ApiPcmAttachOne(mixer, uid, SND_PCM_STREAM_PLAYBACK, sinkJ);
if (!pcm) {
- AFB_ReqFailF(request, "invalid-syntax", "mixer=%s invalid sink= %s", mixer->uid, json_object_get_string(sinkJ));
+ AFB_ReqFailF(request, "bad-pcm", "mixer=%s invalid sink= %s", mixer->uid, json_object_get_string(sinkJ));
goto OnErrorExit;
}
// move from hardware to DMIX attach to sndcard