From d44f3caed23e1bf981b93eee8188a73fdfdc0175 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Tue, 25 Nov 2008 21:34:57 +0100 Subject: [PATCH] para_write: Fix --initial-delay. --- write.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/write.c b/write.c index 78e48dcd..50ed2212 100644 --- a/write.c +++ b/write.c @@ -106,14 +106,19 @@ static void initial_delay_pre_select(struct sched *s, struct task *t) if (!idt->start_time.tv_sec && !idt->start_time.tv_usec) { t->error = -E_NO_DELAY; - return; + goto register_check_wav; } if (tv_diff(now, &idt->start_time, &diff) > 0) { t->error = -E_DELAY_TIMEOUT; - return; + goto register_check_wav; } if (tv_diff(&s->timeout , &diff, NULL) > 0) s->timeout = diff; + return; +register_check_wav: + register_task(&the_check_wav_task.task); + s->timeout.tv_sec = 0; + s->timeout.tv_usec = 1; } INIT_STDERR_LOGGING(conf.loglevel_arg) @@ -210,7 +215,6 @@ int main(int argc, char *argv[]) cwt->input_error = &sit.task.error; sprintf(cwt->task.status, "check wav"); cwt->task.pre_select = check_wav_pre_select; - register_task(&cwt->task); idt->task.pre_select = initial_delay_pre_select; sprintf(idt->task.status, "initial_delay"); -- 2.39.5