From: ratchov Date: Mon, 22 Apr 2024 10:43:16 +0000 (+0000) Subject: sndiod: Call ctlslot->ops->sync() after every control update X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=7680e5d311d479b61f7bec6ee1378e03e513dbbd;p=openbsd sndiod: Call ctlslot->ops->sync() after every control update This ensures that the final NULL sioctl_ondesc() call-back call is not lost. --- 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 * @@ -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); } }