audiod: Fix error message on status errors.
[paraslash.git] / audiod.c
index 611e72d7d851a68f15053a03f21b93e01b1f9f2d..64925b76e6e6d3500186670ec5d4bf5e9f91dd08 100644 (file)
--- a/audiod.c
+++ b/audiod.c
@@ -1223,14 +1223,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_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) {