diff options
author | Fulup Ar Foll <fulup@iot.bzh> | 2017-08-23 22:51:28 +0200 |
---|---|---|
committer | Fulup Ar Foll <fulup@iot.bzh> | 2017-08-23 22:51:28 +0200 |
commit | 612b785b0fb4af835727aa8ebe38afc6c5ec0e1e (patch) | |
tree | 1e06a70ba9418ff734ce2c95a55d2c93d673370e /Alsa-afb/Alsa-SetGet.c | |
parent | 3cf0bf466296cc244738c14e96c398bc9310ffc9 (diff) |
Fix Regretion on AlsaCore Ctl-get
Diffstat (limited to 'Alsa-afb/Alsa-SetGet.c')
-rw-r--r-- | Alsa-afb/Alsa-SetGet.c | 4 |
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); } } } |