summaryrefslogtreecommitdiff
path: root/usr.bin/sndiod
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2024-04-22 10:43:17 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2024-04-22 10:43:17 +0000
commit1d006a5003cb0b20a6458ba3174ce086ae839cc1 (patch)
tree72239308daea14459ffb7439ae547c2e6ddc34cd /usr.bin/sndiod
parent2b5ef90444b535b7780335714677a9e0f74ae9f4 (diff)
sndiod: Call ctlslot->ops->sync() after every control update
This ensures that the final NULL sioctl_ondesc() call-back call is not lost.
Diffstat (limited to 'usr.bin/sndiod')
-rw-r--r--usr.bin/sndiod/dev.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/sndiod/dev.c b/usr.bin/sndiod/dev.c
index 7eaf83dcc8e..97c61c7fa15 100644
--- a/usr.bin/sndiod/dev.c
+++ b/usr.bin/sndiod/dev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dev.c,v 1.109 2024/04/22 10:39:51 ratchov Exp $ */
+/* $OpenBSD: dev.c,v 1.110 2024/04/22 10:43:16 ratchov Exp $ */
/*
* Copyright (c) 2008-2012 Alexandre Ratchov <alex@caoua.org>
*
@@ -2340,6 +2340,8 @@ ctlslot_update(struct ctlslot *s)
/* if control is hidden */
c->desc_mask |= s->self;
}
+ if (s->ops)
+ s->ops->sync(s->arg);
}
void
@@ -2553,6 +2555,7 @@ ctl_update(struct ctl *c)
c->refs_mask |= s->self;
/* if control is hidden */
c->desc_mask |= s->self;
+ s->ops->sync(s->arg);
}
}