From 96782ef80dd52562aa753c36cf4d4abe6b426b64 Mon Sep 17 00:00:00 2001 From: Alexandre Ratchov Date: Sat, 10 Oct 2009 12:43:10 +0000 Subject: make dev_done() common to audio and MIDI, and drop dev_thrudone() --- usr.bin/aucat/midi.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'usr.bin/aucat/midi.c') diff --git a/usr.bin/aucat/midi.c b/usr.bin/aucat/midi.c index 0e794305a36..2a2f9c8c813 100644 --- a/usr.bin/aucat/midi.c +++ b/usr.bin/aucat/midi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: midi.c,v 1.10 2009/10/09 16:49:48 ratchov Exp $ */ +/* $OpenBSD: midi.c,v 1.11 2009/10/10 12:43:09 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov * @@ -225,11 +225,19 @@ thru_out(struct aproc *p, struct abuf *obuf) void thru_eof(struct aproc *p, struct abuf *ibuf) { + if (!(p->u.thru.flags & THRU_AUTOQUIT)) + return; + if (LIST_EMPTY(&p->obuflist) || LIST_EMPTY(&p->ibuflist)) + aproc_del(p); } void thru_hup(struct aproc *p, struct abuf *obuf) { + if (!(p->u.thru.flags & THRU_AUTOQUIT)) + return; + if (LIST_EMPTY(&p->obuflist) || LIST_EMPTY(&p->ibuflist)) + aproc_del(p); } void -- cgit v1.2.3