summaryrefslogtreecommitdiff
path: root/tools.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2000-09-17 15:36:33 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2000-09-17 15:36:33 +0200
commit557f4251b0fe12cb95d2636090b758f3fd7db35a (patch)
treeb350db62ee6842069f172a5c43eff4c720c1168a /tools.c
parent373cf46421062ec28c01df380f8145554ddb59c6 (diff)
downloadvdr-557f4251b0fe12cb95d2636090b758f3fd7db35a.tar.gz
vdr-557f4251b0fe12cb95d2636090b758f3fd7db35a.tar.bz2
Lower limit of 10ms for timeout
Diffstat (limited to 'tools.c')
-rw-r--r--tools.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools.c b/tools.c
index c62a3e13..9196ae57 100644
--- a/tools.c
+++ b/tools.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.c 1.17 2000/09/17 08:23:46 kls Exp $
+ * $Id: tools.c 1.18 2000/09/17 15:36:33 kls Exp $
*/
#define _GNU_SOURCE
@@ -386,6 +386,8 @@ bool cFile::AnyFileReady(int FileDes, int TimeoutMs)
}
if (0 <= FileDes && FileDes < FD_SETSIZE && !files[FileDes])
FD_SET(FileDes, &set); // in case we come in with an arbitrary descriptor
+ if (TimeoutMs == 0)
+ TimeoutMs = 10; // load gets too heavy with 0
struct timeval timeout;
timeout.tv_sec = TimeoutMs / 1000;
timeout.tv_usec = (TimeoutMs % 1000) * 1000;