summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Aillet <jonathan.aillet@iot.bzh>2019-10-15 19:24:28 +0200
committerJonathan Aillet <jonathan.aillet@iot.bzh>2019-10-17 13:32:53 +0000
commit1ffc6ec2e5377e53bd0a29628feab6e9da9902b4 (patch)
tree8464d6fe35a3856632c5791aee9af964c4ad1de1
parentfea205f5eabfb224ce2c9c2c58fe0e4a0ba0befd (diff)
Prevent stop listening for control event on error
Prevent stop listening for ALSA control events when control info and value was not possible to get. This error happen when a custom ALSA control is removed. BUG-AGL: SPEC-2897 Change-Id: Ie206247537715468f704e3c746d6e8744be23cf4 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
-rw-r--r--alsa-binding/Alsa-RegEvt.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/alsa-binding/Alsa-RegEvt.c b/alsa-binding/Alsa-RegEvt.c
index b105288..faacb01 100644
--- a/alsa-binding/Alsa-RegEvt.c
+++ b/alsa-binding/Alsa-RegEvt.c
@@ -583,9 +583,8 @@ STATIC int sndCtlEventCB(sd_event_source* src, int fd, uint32_t revents, void* u
err = alsaGetSingleCtl(sndHandle->evtHandle->ctlDev, elemId, &ctlRequest, QUERY_FULL);
if(err) {
- AFB_ERROR("Did not succeed to get control info and values");
- freeCardAlsaControlHandle(&sndHandle->evtHandle);
- return -3;
+ AFB_WARNING("Did not succeed to get control info and values, a custom control may have been removed");
+ return 0;
}
// If CTL as a value use it as container for response