don't exit from the main loop if there are pending time outs.

Fixes midi inputs not being properly drained when they are
temporarily blocked to limit input data rate
This commit is contained in:
Alexandre Ratchov 2011-06-02 19:37:49 +02:00
parent 0602f18759
commit 4667f82af0
1 changed files with 5 additions and 5 deletions

View File

@ -24,10 +24,10 @@
* the module also provides trivial timeout implementation,
* derived from:
*
* anoncvs@moule.caoua.org:/cvs
* anoncvs@moule.caoua.org:/midish
*
* midish/timo.c rev 1.16
* midish/mdep.c rev 1.69
* midish/timo.c rev 1.18
* midish/mdep.c rev 1.71
*
* A timeout is used to schedule the call of a routine (the callback)
* there is a global list of timeouts that is processed inside the
@ -300,7 +300,7 @@ file_poll(void)
long long delta_nsec;
int res;
if (LIST_EMPTY(&file_list)) {
if (LIST_EMPTY(&file_list) && timo_queue == NULL) {
#ifdef DEBUG
if (debug_level >= 3)
dbg_puts("nothing to do...\n");
@ -489,7 +489,7 @@ file_poll(void)
file_del(f);
f = fnext;
}
if (LIST_EMPTY(&file_list)) {
if (LIST_EMPTY(&file_list) && timo_queue == NULL) {
#ifdef DEBUG
if (debug_level >= 3)
dbg_puts("no files anymore...\n");