=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/sndiod/dev_sioctl.c,v retrieving revision 1.2 retrieving revision 1.3 diff -c -r1.2 -r1.3 *** src/usr.bin/sndiod/dev_sioctl.c 2020/03/08 14:52:20 1.2 --- src/usr.bin/sndiod/dev_sioctl.c 2020/04/15 14:26:40 1.3 *************** *** 1,4 **** ! /* $OpenBSD: dev_sioctl.c,v 1.2 2020/03/08 14:52:20 ratchov Exp $ */ /* * Copyright (c) 2014-2020 Alexandre Ratchov * --- 1,4 ---- ! /* $OpenBSD: dev_sioctl.c,v 1.3 2020/04/15 14:26:40 ratchov Exp $ */ /* * Copyright (c) 2014-2020 Alexandre Ratchov * *************** *** 115,122 **** void dev_sioctl_open(struct dev *d) { ! if (d->sioctl.hdl == NULL) return; sioctl_ondesc(d->sioctl.hdl, dev_sioctl_ondesc, d); sioctl_onval(d->sioctl.hdl, dev_sioctl_onval, d); d->sioctl.file = file_new(&dev_sioctl_ops, d, "mix", --- 115,130 ---- void dev_sioctl_open(struct dev *d) { ! if (d->sioctl.hdl == NULL) { ! /* ! * At this point there are clients, for instance if we're ! * called by dev_reopen() but the control device couldn't ! * be opened. In this case controls have changed (thoseof ! * old device are just removed) so we need to notify clients. ! */ ! dev_ctlsync(d); return; + } sioctl_ondesc(d->sioctl.hdl, dev_sioctl_ondesc, d); sioctl_onval(d->sioctl.hdl, dev_sioctl_onval, d); d->sioctl.file = file_new(&dev_sioctl_ops, d, "mix",