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)
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");