Terminate midi thru boxes trying to drain but that have no

outputs anymore, otherwise they can't be cleaned up by dev_close()
This commit is contained in:
Alexandre Ratchov 2010-11-14 14:51:30 +01:00
parent 35beeb5513
commit 15c8794e5f
1 changed files with 5 additions and 1 deletions

View File

@ -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