diff options
author | Thierry Bultel <thierry.bultel@iot.bzh> | 2018-11-08 13:59:50 +0100 |
---|---|---|
committer | Thierry Bultel <thierry.bultel@iot.bzh> | 2018-11-13 14:34:02 +0100 |
commit | 109036431c4bde92c67105a6044616a4c035d82c (patch) | |
tree | 9e6ae0bc6282689e9175e5d79f079c8a4e820678 /plugins/alsa/alsa-api-source.c | |
parent | 6ee71f44ebbb19809c75fb3b2ec4ca184b6e60fd (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-source.c')
-rw-r--r-- | plugins/alsa/alsa-api-source.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/alsa/alsa-api-source.c b/plugins/alsa/alsa-api-source.c index b6e1390..4f356b2 100644 --- a/plugins/alsa/alsa-api-source.c +++ b/plugins/alsa/alsa-api-source.c @@ -50,7 +50,7 @@ PUBLIC int ApiSourceAttach(SoftMixerT *mixer, AFB_ReqT request, const char *uid, case json_type_object: mixer->sources[index] = ApiPcmAttachOne(mixer, uid, SND_PCM_STREAM_CAPTURE, argsJ); if (!mixer->sources[index]) { - AFB_ReqFailF(request, "invalid-syntax", "mixer=%s invalid source= %s", mixer->uid, json_object_get_string(argsJ)); + AFB_ReqFailF(request, "bad-pcm", "mixer=%s invalid source= %s", mixer->uid, json_object_get_string(argsJ)); goto OnErrorExit; } break; @@ -67,7 +67,7 @@ PUBLIC int ApiSourceAttach(SoftMixerT *mixer, AFB_ReqT request, const char *uid, json_object *sourceJ = json_object_array_get_idx(argsJ, idx); mixer->sources[index + idx] = ApiPcmAttachOne(mixer, uid, SND_PCM_STREAM_CAPTURE, sourceJ); if (!mixer->sources[index + idx]) { - AFB_ReqFailF(request, "invalid-syntax", "mixer=%s invalid source= %s", mixer->uid, json_object_get_string(sourceJ)); + AFB_ReqFailF(request, "bad-pcm", "mixer=%s invalid source= %s", mixer->uid, json_object_get_string(sourceJ)); goto OnErrorExit; } } @@ -81,4 +81,4 @@ PUBLIC int ApiSourceAttach(SoftMixerT *mixer, AFB_ReqT request, const char *uid, OnErrorExit: return -1; -}
\ No newline at end of file +} |