diff options
Diffstat (limited to 'alsa-binding/Alsa-RegEvt.c')
-rw-r--r-- | alsa-binding/Alsa-RegEvt.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/alsa-binding/Alsa-RegEvt.c b/alsa-binding/Alsa-RegEvt.c index 974431e..36bb590 100644 --- a/alsa-binding/Alsa-RegEvt.c +++ b/alsa-binding/Alsa-RegEvt.c @@ -101,6 +101,12 @@ STATIC int sndCtlEventCB(sd_event_source* src, int fd, uint32_t revents, void* u ctlRequestT ctlRequest; snd_ctl_elem_id_t *elemId; + if ((revents & EPOLLERR) != 0) { + AFB_ERROR("An error has been send by event loop polling, prevent new errors to be fired by deleting event src"); + sd_event_source_unref(src); + return -1; + } + if ((revents & EPOLLHUP) != 0) { AFB_NOTICE("SndCtl hanghup [car disconnected]"); goto ExitOnSucess; |