X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=audiod.c;h=27c153d791ee95983591e89176cf5917545e41df;hp=32c839411b138406ab4bb760f8b8b9b873c1305d;hb=f74525557a0f63090de04fcb2ad401db0783f9a3;hpb=4f01c486bb70a27f614cdc9c07a2b8d653db7605 diff --git a/audiod.c b/audiod.c index 32c83941..27c153d7 100644 --- a/audiod.c +++ b/audiod.c @@ -902,8 +902,15 @@ static void command_post_select(struct sched *s, struct task *t) { int ret; struct command_task *ct = container_of(t, struct command_task, task); + static struct timeval last_status_dump; + struct timeval tmp; + + tv_add(&last_status_dump, &(struct timeval){0, 500 * 1000}, &tmp); + if (tv_diff(&tmp, now, NULL) < 0) { + audiod_status_dump(); + last_status_dump = *now; + } - audiod_status_dump(); if (!FD_ISSET(ct->fd, &s->rfds)) return; ret = handle_connect(ct->fd); @@ -1227,7 +1234,7 @@ int main(int argc, char *argv[]) register_task(&cmd_task->task); register_task(&stat_task->task); s.default_timeout.tv_sec = 0; - s.default_timeout.tv_usec = 99 * 1000; + s.default_timeout.tv_usec = 999 * 1000; ret = schedule(&s); PARA_EMERG_LOG("%s\n", para_strerror(-ret));