]> git.tue.mpg.de Git - paraslash.git/commitdiff
audiod: compute diff of server time and local time correctly
authorAndre <maan@p133.(none)>
Tue, 2 Jan 2007 23:15:17 +0000 (00:15 +0100)
committerAndre <maan@p133.(none)>
Tue, 2 Jan 2007 23:15:17 +0000 (00:15 +0100)
Current code misses to store the signum of the (average)
difference of server time and local time.

NEWS
audiod.c

diff --git a/NEWS b/NEWS
index 77399d2dde54b7066f81aa8560431ba23caa495b..6cc50529f7b07bb29389e1f1c5bbf22227a3a680 100644 (file)
--- 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"
index 40c75952570eb60c09ddf7904eda43cc37f90108..d17ec5e98b0631cd7662a8259b6706bc4f65e20a 100644 (file)
--- 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)