From: Andre Date: Tue, 2 Jan 2007 23:15:17 +0000 (+0100) Subject: audiod: compute diff of server time and local time correctly X-Git-Tag: v0.2.15~119 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=a2e44841e8f3d5642842280d471a0002cf5fdd32;p=paraslash.git audiod: compute diff of server time and local time correctly Current code misses to store the signum of the (average) difference of server time and local time. --- diff --git a/NEWS b/NEWS index 77399d2d..6cc50529 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,8 @@ NEWS - mp3dec: Fix decoding of corrupt mp3 files - para_audiod/para_filter: Fix a bug that caused the last chunk of audio data not being written under certain circumstances + - audiod: compute the difference of server time and local time + correctly ------------------------------------------- 0.2.14 (2006-10-15) "transient singularity" diff --git a/audiod.c b/audiod.c index 40c75952..d17ec5e9 100644 --- a/audiod.c +++ b/audiod.c @@ -493,7 +493,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 +513,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)