diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2001-08-05 12:40:37 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2001-08-05 12:40:37 +0200 |
commit | ae1560819792427d08a7cb51f19b6dccaa850fa2 (patch) | |
tree | e562e5360d34f9cc78073b86e1199885bc5653f5 | |
parent | c2ed9b5daf19b86823b27a06799d7d43d476f654 (diff) | |
download | vdr-ae1560819792427d08a7cb51f19b6dccaa850fa2.tar.gz vdr-ae1560819792427d08a7cb51f19b6dccaa850fa2.tar.bz2 |
Fixed timeout calculation in cFile::FileReady()
-rw-r--r-- | CONTRIBUTORS | 3 | ||||
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | tools.c | 6 |
3 files changed, 8 insertions, 3 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index c5198984..43dced95 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -112,3 +112,6 @@ Andreas Schultz <aschultz@warp10.net> Aaron Holtzman for writing 'ac3dec' + +Wolfgang Henselmann-Weiss <Wolfgang_Henselmann@betaresearch.de> + for fixing calculating the timeout value in cFile::FileReady() @@ -619,3 +619,5 @@ Video Disk Recorder Revision History - Fixed replay progress display in case replay is paused while watching an ongoing recording. - Ringbuffer uses semaphores to signal empty/full conditions. +- Fixed calculating the timeout value in cFile::FileReady() (thanks to + Wolfgang Henselmann-Weiss). @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: tools.c 1.34 2001/05/20 08:30:54 kls Exp $ + * $Id: tools.c 1.35 2001/08/05 12:38:06 kls Exp $ */ #define _GNU_SOURCE @@ -406,8 +406,8 @@ bool cFile::FileReady(int FileDes, int TimeoutMs) FD_SET(FileDes, &set); if (TimeoutMs < 100) TimeoutMs = 100; - timeout.tv_sec = 0; - timeout.tv_usec = TimeoutMs * 1000; + timeout.tv_sec = TimeoutMs / 1000; + timeout.tv_usec = (TimeoutMs % 1000) * 1000; return select(FD_SETSIZE, &set, NULL, NULL, &timeout) > 0 && FD_ISSET(FileDes, &set); } |