*/
/** \file audiod.c the paraslash's audio daemon */
+#include <regex.h>
#include <sys/types.h>
#include <dirent.h>
#include <signal.h>
{
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);
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));