X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=audiod.c;h=948204dc8829a78c3a4595d5a03dde48733d0462;hb=0b43ec5dfd9e301257e3c0b31733ea67c1db4426;hp=afdb97f7a9ea4b135378954d974e44b234ef4633;hpb=74e29e3e9f53baa879bb2f6d7aaf7448f36686a1;p=paraslash.git diff --git a/audiod.c b/audiod.c index afdb97f7..948204dc 100644 --- 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) {