summaryrefslogtreecommitdiffstats
path: root/plugins/alsa/alsa-api-mixer.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/alsa/alsa-api-mixer.c')
-rw-r--r--plugins/alsa/alsa-api-mixer.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/plugins/alsa/alsa-api-mixer.c b/plugins/alsa/alsa-api-mixer.c
index 21acc1c..30f47a2 100644
--- a/plugins/alsa/alsa-api-mixer.c
+++ b/plugins/alsa/alsa-api-mixer.c
@@ -484,8 +484,8 @@ STATIC void MixerInfoAction(AFB_ReqT request, json_object * argsJ) {
, "zones", &zonesJ
);
if (error) {
- AFB_ReqFailF(request, "invalid-syntax", "list missing 'quiet|stream|backend|source' argsJ=%s", json_object_get_string(argsJ));
- goto OnErrorExit;
+ AFB_ReqFailF(request, "invalid-syntax", "list missing 'verbose|streams|ramps|captures|playbacks|zones' argsJ=%s", json_object_get_string(argsJ));
+ return;
}
json_object *responseJ = json_object_new_object();
@@ -493,8 +493,8 @@ STATIC void MixerInfoAction(AFB_ReqT request, json_object * argsJ) {
if (streamsJ) {
json_object *resultJ = MixerInfoStreams(mixer, streamsJ, verbose);
if (!resultJ) {
- AFB_ReqFailF(request, "invalid-object", "streams should be boolean or string argsJ=%s", json_object_get_string(streamsJ));
- goto OnErrorExit;
+ AFB_ReqFailF(request, "not-found", "fail to find streams (should be a boolean, a string, or an array of them) argsJ=%s", json_object_get_string(streamsJ));
+ return;
}
json_object_object_add(responseJ, "streams", resultJ);
}
@@ -522,9 +522,6 @@ STATIC void MixerInfoAction(AFB_ReqT request, json_object * argsJ) {
AFB_ReqSuccess(request, responseJ, NULL);
return;
-
-OnErrorExit:
- AFB_ReqFail(request, "internal-error", "fail to get mixer info");
}
STATIC void MixerInfoVerb(AFB_ReqT request) {