summaryrefslogtreecommitdiff
path: root/usr.bin/sndiod/dev.c
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2021-01-28 11:17:59 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2021-01-28 11:17:59 +0000
commit939f297174d37458ae4ca0e0c629fbc7fc67876c (patch)
tree0fc4c927a502f11f3470a8c9864e332a2c3ca8cc /usr.bin/sndiod/dev.c
parent305dfd425594dfa4017b1fc81e45ad43a7fd2b08 (diff)
When an audio device is disconnected, drop MIDI clients controlling it
Diffstat (limited to 'usr.bin/sndiod/dev.c')
-rw-r--r--usr.bin/sndiod/dev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/sndiod/dev.c b/usr.bin/sndiod/dev.c
index 06412ae6ade..1a98fa39fc7 100644
--- a/usr.bin/sndiod/dev.c
+++ b/usr.bin/sndiod/dev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dev.c,v 1.82 2021/01/28 11:15:31 ratchov Exp $ */
+/* $OpenBSD: dev.c,v 1.83 2021/01/28 11:17:58 ratchov Exp $ */
/*
* Copyright (c) 2008-2012 Alexandre Ratchov <alex@caoua.org>
*
@@ -1274,6 +1274,8 @@ dev_abort(struct dev *d)
c->ops = NULL;
}
+ midi_abort(d->midi);
+
if (d->pstate != DEV_CFG)
dev_close(d);
}