]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - audiod.c
task_register() conversion: client task
[paraslash.git] / audiod.c
index afdb97f7a9ea4b135378954d974e44b234ef4633..948204dc8829a78c3a4595d5a03dde48733d0462 100644 (file)
--- a/audiod.c
+++ b/audiod.c
@@ -1081,6 +1081,7 @@ static void close_stat_pipe(void)
        if (!stat_task->ct)
                return;
        client_close(stat_task->ct);
+       task_reap(&stat_task->ct->task);
        stat_task->ct = NULL;
        clear_and_dump_items();
        stat_task->length_seconds = 0;
@@ -1231,8 +1232,8 @@ static int status_post_select(struct sched *s, struct task *t)
        if (audiod_status == AUDIOD_OFF) {
                if (!st->ct)
                        goto out;
-               if (st->ct->task.error >= 0) {
-                       task_notify(&st->ct->task, E_AUDIOD_OFF);
+               if (st->ct->task->error >= 0) {
+                       task_notify(st->ct->task, E_AUDIOD_OFF);
                        goto out;
                }
                close_stat_pipe();
@@ -1255,14 +1256,14 @@ static int status_post_select(struct sched *s, struct task *t)
                        struct timeval diff;
                        tv_diff(now, &st->last_status_read, &diff);
                        if (diff.tv_sec > 61)
-                               task_notify(&st->ct->task, E_STATUS_TIMEOUT);
+                               task_notify(st->ct->task, E_STATUS_TIMEOUT);
                        goto out;
                }
                btr_merge(st->btrn, st->min_iqs);
                sz = btr_next_buffer(st->btrn, &buf);
                ret = for_each_stat_item(buf, sz, update_item);
                if (ret < 0) {
-                       task_notify(&st->ct->task, -ret);
+                       task_notify(st->ct->task, -ret);
                        goto out;
                }
                if (sz != ret) {