summaryrefslogtreecommitdiff
path: root/usr.bin/aucat
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2010-06-05 16:05:18 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2010-06-05 16:05:18 +0000
commitecb1c7fc2b2f86863b943929ec79301a99b7e338 (patch)
treefeb15f2cc93bbda9428c1d10e96c53f1db902053 /usr.bin/aucat
parente659327504f6936b52a3262296dcc0c05a8615dc (diff)
When closing the device, request clients using a midi control slot
to quit. Otherwise streams that are not attached to the device are not closed.
Diffstat (limited to 'usr.bin/aucat')
-rw-r--r--usr.bin/aucat/midi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/aucat/midi.c b/usr.bin/aucat/midi.c
index d7a85512aef..85814906e95 100644
--- a/usr.bin/aucat/midi.c
+++ b/usr.bin/aucat/midi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: midi.c,v 1.26 2010/06/04 07:02:59 ratchov Exp $ */
+/* $OpenBSD: midi.c,v 1.27 2010/06/05 16:05:17 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -1120,8 +1120,8 @@ ctl_eof(struct aproc *p, struct abuf *ibuf)
if (!(p->flags & APROC_QUIT))
return;
for (i = 0, s = p->u.ctl.slot; i < CTL_NSLOT; i++, s++) {
- if (s->ops)
- return;
+ if (s->ops != NULL)
+ s->ops->quit(s->arg);
}
if (!LIST_EMPTY(&p->outs) || !LIST_EMPTY(&p->ins))
aproc_del(p);