- ret = client_open(argc, argv, &st->pcd);
- }
- if (ret < 0)
- return;
- st->pcd->task.event_handler = client_task_event_handler;
- s->timeout.tv_sec = 0;
- s->timeout.tv_usec = 1;
-}
-
-static void status_post_select(__a_unused struct sched *s, struct task *t)
-{
- struct status_task *st = t->private_data;
- unsigned bytes_left;
-
- t->ret = 1;
- if (!st->pcd || st->pcd->status != CL_RECEIVING)
- return;
- if (st->pcd && audiod_status == AUDIOD_OFF) {
- unregister_task(&st->pcd->task);
- close_stat_pipe();
- st->clock_diff_count = conf.clock_diff_count_arg;
- return;
- }
- bytes_left = for_each_line(st->pcd->buf, st->pcd->loaded,
- &check_stat_line);
- if (st->pcd->loaded != bytes_left) {
- st->last_status_read = *now;
- st->pcd->loaded = bytes_left;
- } else {
- struct timeval diff;
- tv_diff(now, &st->last_status_read, &diff);
- if (diff.tv_sec > 61)
- close_stat_pipe();
+ client_open(argc, argv, &st->ct);
+ set_stat_task_restart_barrier(5);