From 7680e5d311d479b61f7bec6ee1378e03e513dbbd Mon Sep 17 00:00:00 2001 From: ratchov Date: Mon, 22 Apr 2024 10:43:16 +0000 Subject: [PATCH] sndiod: Call ctlslot->ops->sync() after every control update This ensures that the final NULL sioctl_ondesc() call-back call is not lost. --- usr.bin/sndiod/dev.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); } } -- 2.20.1