summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-09-02 13:55:37 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2005-09-02 13:55:37 +0200
commit2ffcc66af2cb3f379fd8445c019b0cac1c2cc275 (patch)
tree80f1bcaf8fe0366438aa62487c7aa7ac0fdac165 /device.c
parent85904ae23d301839c67af479fd66ee0fe4d6c5cd (diff)
downloadvdr-2ffcc66af2cb3f379fd8445c019b0cac1c2cc275.tar.gz
vdr-2ffcc66af2cb3f379fd8445c019b0cac1c2cc275.tar.bz2
Re-introduced the code that waits for a tuner lock in VDR/device.c
Diffstat (limited to 'device.c')
-rw-r--r--device.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/device.c b/device.c
index 23808030..0ae2965d 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c 1.107 2005/08/27 09:01:09 kls Exp $
+ * $Id: device.c 1.108 2005/09/02 13:52:31 kls Exp $
*/
#include "device.h"
@@ -1185,6 +1185,15 @@ bool cDevice::AttachReceiver(cReceiver *Receiver)
return false;
if (Receiver->device == this)
return true;
+// activate the following line if you need it - actually the driver should be fixed!
+//#define WAIT_FOR_TUNER_LOCK
+#ifdef WAIT_FOR_TUNER_LOCK
+#define TUNER_LOCK_TIMEOUT 5000 // ms
+ if (!HasLock(TUNER_LOCK_TIMEOUT)) {
+ esyslog("ERROR: device %d has no lock, can't attach receiver!", CardIndex() + 1);
+ return false;
+ }
+#endif
cMutexLock MutexLock(&mutexReceiver);
for (int i = 0; i < MAXRECEIVERS; i++) {
if (!receiver[i]) {