mirror of https://github.com/ericonr/sndio.git
Kick ctl clients when device is closed
This commit is contained in:
parent
f73fd84ddf
commit
e15f9cc366
|
@ -1174,6 +1174,7 @@ dev_exitall(struct dev *d)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
struct slot *s;
|
struct slot *s;
|
||||||
|
struct ctlslot *c;
|
||||||
|
|
||||||
for (s = d->slot, i = DEV_NSLOT; i > 0; i--, s++) {
|
for (s = d->slot, i = DEV_NSLOT; i > 0; i--, s++) {
|
||||||
if (s->ops)
|
if (s->ops)
|
||||||
|
@ -1181,6 +1182,12 @@ dev_exitall(struct dev *d)
|
||||||
s->ops = NULL;
|
s->ops = NULL;
|
||||||
}
|
}
|
||||||
d->slot_list = NULL;
|
d->slot_list = NULL;
|
||||||
|
|
||||||
|
for (c = d->ctlslot, i = DEV_NCTLSLOT; i > 0; i--, c++) {
|
||||||
|
if (c->ops)
|
||||||
|
c->ops->exit(c->arg);
|
||||||
|
c->ops = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue