From 612b785b0fb4af835727aa8ebe38afc6c5ec0e1e Mon Sep 17 00:00:00 2001 From: Fulup Ar Foll Date: Wed, 23 Aug 2017 22:51:28 +0200 Subject: Fix Regretion on AlsaCore Ctl-get --- Alsa-afb/Alsa-SetGet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Alsa-afb') 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); } } } -- cgit 1.2.3-korg