From 15c8794e5f6195eb0ebf01f3889525bd4aacfd8a Mon Sep 17 00:00:00 2001 From: Alexandre Ratchov Date: Sun, 14 Nov 2010 14:51:30 +0100 Subject: [PATCH] Terminate midi thru boxes trying to drain but that have no outputs anymore, otherwise they can't be cleaned up by dev_close() --- aucat/midi.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/aucat/midi.c b/aucat/midi.c index 5aba26d..00bcf63 100644 --- a/aucat/midi.c +++ b/aucat/midi.c @@ -274,13 +274,17 @@ thru_eof(struct aproc *p, struct abuf *ibuf) { if (!(p->flags & APROC_QUIT)) return; - if (LIST_EMPTY(&p->ins)) + if (LIST_EMPTY(&p->ins) || LIST_EMPTY(&p->outs)) aproc_del(p); } void thru_hup(struct aproc *p, struct abuf *obuf) { + if (!(p->flags & APROC_QUIT)) + return; + if (LIST_EMPTY(&p->outs)) + aproc_del(p); } void