From 4667f82af0721bfe05bef64a68dc482a7ccb4c1b Mon Sep 17 00:00:00 2001 From: Alexandre Ratchov Date: Thu, 2 Jun 2011 19:37:49 +0200 Subject: [PATCH] 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 --- aucat/file.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/aucat/file.c b/aucat/file.c index 1ecb369..c412a97 100644 --- a/aucat/file.c +++ b/aucat/file.c @@ -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");