summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
Diffstat (limited to 'device.c')
-rw-r--r--device.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/device.c b/device.c
index f1261b75..54e612c6 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c,v 1.35 2007-03-14 17:40:38 phintuka Exp $
+ * $Id: device.c,v 1.36 2007-03-28 14:40:10 phintuka Exp $
*
*/
@@ -241,6 +241,7 @@ bool cXinelibDevice::StartDevice()
// if(dynamic_cast<cXinelibLocal*>(it))
if(m_local) {
+ int timer = 0;
m_local->Start();
while(!m_local->IsReady()) {
cCondWait::SleepMs(100);
@@ -248,12 +249,17 @@ bool cXinelibDevice::StartDevice()
LOGMSG("cXinelibDevice::Start(): Local frontend init failed");
return false;
}
+ if(++timer >= 7*10) {
+ LOGMSG("cXinelibDevice::Start(): Local frontend init timeout");
+ return false;
+ }
}
if(xc.force_primary_device)
ForcePrimaryDevice(true);
}
if(m_server) {
+ int timer = 0;
m_server->Start();
while(!m_server->IsReady()) {
cCondWait::SleepMs(100);
@@ -261,6 +267,10 @@ bool cXinelibDevice::StartDevice()
LOGMSG("cXinelibDevice::Start(): Server init failed");
return false;
}
+ if(++timer >= 5*10) {
+ LOGMSG("cXinelibDevice::Start(): Server init timeout");
+ return false;
+ }
}
}