return 1;
}
-static int main_btr(struct sched *s)
+static int setup_and_schedule(void)
{
int i, ret;
struct check_wav_task _cwt, *cwt = &_cwt;
struct writer_node *wns;
+ static struct sched s;
loglevel = get_loglevel_by_name(conf.loglevel_arg);
sit.btrn = btr_new_node(&(struct btr_node_description)
}
}
- s->default_timeout.tv_sec = 10;
- s->default_timeout.tv_usec = 50000;
- ret = schedule(s);
+ s.default_timeout.tv_sec = 10;
+ s.default_timeout.tv_usec = 50000;
+ ret = schedule(&s);
if (ret >= 0) {
int j;
for (j = 0; j < i; j++) {
int main(int argc, char *argv[])
{
int ret = -E_WRITE_SYNTAX;
- static struct sched s;
writer_init();
write_cmdline_parser(argc, argv, &conf);
if (conf.help_given || conf.detailed_help_given)
print_help_and_die();
- ret = main_btr(&s);
+ ret = setup_and_schedule();
if (ret < 0) {
PARA_ERROR_LOG("%s\n", para_strerror(-ret));
exit(EXIT_FAILURE);