From e34e5f6ddb04a9c4fb0aa8e21bb2aeb7c03d687a Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 21 Jul 2013 16:23:00 +0200 Subject: [PATCH] audiod: Improve status timeout handling. Don't look at the task error field directly. The node status gives equivalent information. --- audiod.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/audiod.c b/audiod.c index 91f6e1e6..dcf2c147 100644 --- a/audiod.c +++ b/audiod.c @@ -1228,14 +1228,15 @@ static int status_post_select(struct sched *s, struct task *t) char *buf; size_t sz; int ret; - if (st->ct->task.error < 0) { + + ret = btr_node_status(st->btrn, st->min_iqs, BTR_NT_LEAF); + if (ret < 0) { close_stat_pipe(); goto out; } if (st->ct->status != CL_EXECUTING) goto out; - ret = btr_node_status(st->btrn, st->min_iqs, BTR_NT_LEAF); - if (ret <= 0) { + if (ret == 0) { struct timeval diff; tv_diff(now, &st->last_status_read, &diff); if (diff.tv_sec > 61) -- 2.39.2