]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - audiod.c
audiod: Fix error message on status errors.
[paraslash.git] / audiod.c
index 8f2a72ac8700ee0699c19d78724cbe1d6ec61296..64925b76e6e6d3500186670ec5d4bf5e9f91dd08 100644 (file)
--- a/audiod.c
+++ b/audiod.c
@@ -1216,21 +1216,21 @@ static int status_post_select(struct sched *s, struct task *t)
                        close_stat_pipe();
                        goto out;
                }
-               if (st->ct->status != CL_RECEIVING)
+               if (st->ct->status != CL_EXECUTING)
                        goto out;
                ret = btr_node_status(st->btrn, st->min_iqs, BTR_NT_LEAF);
                if (ret <= 0) {
                        struct timeval diff;
                        tv_diff(now, &st->last_status_read, &diff);
                        if (diff.tv_sec > 61)
-                               task_notify(&st->ct->task, E_AUDIOD_OFF);
+                               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, E_AUDIOD_OFF);
+                       task_notify(&st->ct->task, -ret);
                        goto out;
                }
                if (sz != ret) {