X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=audiod.c;h=2798ad26d57387c65779d9435b5ac471b901a54d;hp=40c75952570eb60c09ddf7904eda43cc37f90108;hb=1b46ae4193cddb7d589b0f2f7d8158b84f7e9f6d;hpb=d42af6d28fa44d085b048cb064e20c79189b88b2 diff --git a/audiod.c b/audiod.c index 40c75952..2798ad26 100644 --- a/audiod.c +++ b/audiod.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2006 Andre Noll + * Copyright (C) 2005-2007 Andre Noll * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -37,6 +37,7 @@ #include "write.h" #include "write_common.h" #include "error.h" +#include "signal.h" /** define the array of error lists needed by para_audiod */ INIT_AUDIOD_ERRLISTS; @@ -493,7 +494,7 @@ static void compute_time_diff(const struct timeval *status_time) sa_time_diff_sign = sign; stat_task->sa_time_diff = diff; count++; - return; + goto out; } if (count > 5) { int s = tv_diff(&diff, &stat_task->sa_time_diff, &tmp); @@ -513,6 +514,8 @@ static void compute_time_diff(const struct timeval *status_time) sa_time_diff_sign ? "+" : "-", tv2ms(&stat_task->sa_time_diff) ); +out: + stat_task->sa_time_diff_sign = sa_time_diff_sign; } static void check_stat_line(char *line) @@ -1016,17 +1019,14 @@ static void status_pre_select(struct sched *s, struct task *t) if (tv_diff(now, &st->clock_diff_barrier, NULL) < 0) return; PARA_INFO_LOG("clock diff count: %d\n", st->clock_diff_count); - t->ret = client_parse_config(argc, argv, &st->pcd); + t->ret = client_open(argc, argv, &st->pcd); } else { char *argv[] = {"audiod", "stat", NULL}; int argc = 2; - t->ret = client_parse_config(argc, argv, &st->pcd); + t->ret = client_open(argc, argv, &st->pcd); } - if (t->ret < 0) - return; - t->ret = client_open(st->pcd); if (t->ret < 0) return; st->pcd->task.event_handler = client_task_event_handler;