aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-12-13 21:02:33 +0100
committerMax Kellermann <max@duempel.org>2011-12-13 21:02:48 +0100
commit097e5dfbdc2ec958045d5f4b5ec5e7cfa396360e (patch)
treefb1367a6357133facf8e256ced05adda0921b396
parent2ef7ee6ca7adcd66b00adf9e8de1c7adf29f371c (diff)
downloadmpd-097e5dfbdc2ec958045d5f4b5ec5e7cfa396360e.tar.gz
mpd-097e5dfbdc2ec958045d5f4b5ec5e7cfa396360e.tar.xz
mpd-097e5dfbdc2ec958045d5f4b5ec5e7cfa396360e.zip
timer: fix time unit mixup in timer_delay()
The local variable was already divided by 1000, and the return value was being divided by 1000 again - doh! This caused delays in the httpd output plugin that were too small by three orders of magnitude, and the buffer was filled too quickly.
-rw-r--r--NEWS2
-rw-r--r--src/timer.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 126d52e1d..d66ca1d4f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,6 @@
ver 0.16.7 (2011/??/??)
+* output:
+ - httpd: fix excessive buffering
ver 0.16.6 (2011/12/01)
diff --git a/src/timer.c b/src/timer.c
index 0b3b1198a..ba82fc522 100644
--- a/src/timer.c
+++ b/src/timer.c
@@ -81,7 +81,7 @@ timer_delay(const Timer *timer)
if (delay > G_MAXINT)
delay = G_MAXINT;
- return delay / 1000;
+ return delay;
}
void timer_sync(Timer *timer)