aboutsummaryrefslogtreecommitdiffstats
path: root/Alsa-afb
diff options
context:
space:
mode:
authorFulup Ar Foll <fulup@iot.bzh>2017-08-23 22:51:28 +0200
committerFulup Ar Foll <fulup@iot.bzh>2017-08-23 22:51:28 +0200
commit612b785b0fb4af835727aa8ebe38afc6c5ec0e1e (patch)
tree1e06a70ba9418ff734ce2c95a55d2c93d673370e /Alsa-afb
parent3cf0bf466296cc244738c14e96c398bc9310ffc9 (diff)
Fix Regretion on AlsaCore Ctl-get
Diffstat (limited to 'Alsa-afb')
-rw-r--r--Alsa-afb/Alsa-SetGet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Alsa-afb/Alsa-SetGet.c b/Alsa-afb/Alsa-SetGet.c
index 7450944..71206e6 100644
--- a/Alsa-afb/Alsa-SetGet.c
+++ b/Alsa-afb/Alsa-SetGet.c
@@ -759,8 +759,8 @@ STATIC void alsaSetGetCtls(ActionSetGetT action, afb_req request) {
else {
// Do not embed response in an array when only one ctl was requested
if (action == ACTION_GET) {
- if (queryValues.count > 1) json_object_array_add(sndctls, ctlRequest[jdx].valuesJ);
- else sndctls = ctlRequest[jdx].valuesJ;
+ if (queryValues.count == 1) sndctls = ctlRequest[jdx].valuesJ;
+ else json_object_array_add(sndctls, ctlRequest[jdx].valuesJ);
}
}
}