summaryrefslogtreecommitdiff
path: root/usr.bin/aucat/midi.c
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2011-06-02 18:50:40 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2011-06-02 18:50:40 +0000
commita1ffda8d647e28b75e44b0fe269118da18cc628c (patch)
tree832b184a46b6e117a9349d51cf29bc6320914de8 /usr.bin/aucat/midi.c
parent56c2dbe09d3c2c69f42fa06d105e6d63539df050 (diff)
close midi control ports and thru boxes only when there are no
inputs anymore, to ensure data is drained
Diffstat (limited to 'usr.bin/aucat/midi.c')
-rw-r--r--usr.bin/aucat/midi.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/aucat/midi.c b/usr.bin/aucat/midi.c
index 0d3a474d405..c3175263f6d 100644
--- a/usr.bin/aucat/midi.c
+++ b/usr.bin/aucat/midi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: midi.c,v 1.33 2011/05/09 18:03:08 ratchov Exp $ */
+/* $OpenBSD: midi.c,v 1.34 2011/06/02 18:50:39 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -272,7 +272,7 @@ thru_eof(struct aproc *p, struct abuf *ibuf)
{
if (!(p->flags & APROC_QUIT))
return;
- if (LIST_EMPTY(&p->ins) || LIST_EMPTY(&p->outs))
+ if (LIST_EMPTY(&p->ins))
aproc_del(p);
}
@@ -281,7 +281,7 @@ thru_hup(struct aproc *p, struct abuf *obuf)
{
if (!(p->flags & APROC_QUIT))
return;
- if (LIST_EMPTY(&p->outs))
+ if (LIST_EMPTY(&p->ins))
aproc_del(p);
}
@@ -788,7 +788,7 @@ ctl_slotdel(struct aproc *p, int index)
if (s->ops)
return;
}
- if (!LIST_EMPTY(&p->outs) || !LIST_EMPTY(&p->ins))
+ if (LIST_EMPTY(&p->ins))
aproc_del(p);
}
@@ -1166,7 +1166,7 @@ ctl_eof(struct aproc *p, struct abuf *ibuf)
if (s->ops != NULL)
s->ops->quit(s->arg);
}
- if (!LIST_EMPTY(&p->outs) || !LIST_EMPTY(&p->ins))
+ if (LIST_EMPTY(&p->ins))
aproc_del(p);
}
@@ -1182,7 +1182,7 @@ ctl_hup(struct aproc *p, struct abuf *obuf)
if (s->ops)
return;
}
- if (!LIST_EMPTY(&p->outs) || !LIST_EMPTY(&p->ins))
+ if (LIST_EMPTY(&p->ins))
aproc_del(p);
}