From: Andre Noll Date: Sun, 21 Jul 2013 14:23:00 +0000 (+0200) Subject: audiod: Improve status timeout handling. X-Git-Tag: v0.5.1~11^2~2 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=e34e5f6ddb04a9c4fb0aa8e21bb2aeb7c03d687a;p=paraslash.git audiod: Improve status timeout handling. Don't look at the task error field directly. The node status gives equivalent information. --- 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)