mirror of
https://github.com/alsa-project/alsa-utils
synced 2025-01-03 09:39:44 +01:00
alsactl: daemon mode - remove disconnected cards
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
e05b903b1f
commit
9cb5e5bee7
1 changed files with 3 additions and 1 deletions
|
@ -431,7 +431,9 @@ int state_daemon(const char *file, const char *cardname, int period,
|
|||
goto out;
|
||||
}
|
||||
j += cards[i]->pfds;
|
||||
if (revents & POLLIN) {
|
||||
if (revents & (POLLERR|POLLNVAL)) {
|
||||
card_free(&cards[i]);
|
||||
} else if (revents & POLLIN) {
|
||||
if (card_events(cards[i])) {
|
||||
/* delay the write */
|
||||
if (!changed)
|
||||
|
|
Loading…
Reference in a new issue