diff options
author | phintuka <phintuka> | 2007-03-28 14:40:10 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2007-03-28 14:40:10 +0000 |
commit | e936d40b1f695badf0d97fd2390ce662f5419d3d (patch) | |
tree | 065fba882f2793cf4a81d3a02b1268f935bde770 | |
parent | 7d0877b183e054826f08e1da73eb354203cb3feb (diff) | |
download | xineliboutput-e936d40b1f695badf0d97fd2390ce662f5419d3d.tar.gz xineliboutput-e936d40b1f695badf0d97fd2390ce662f5419d3d.tar.bz2 |
Initialization timeouts
-rw-r--r-- | device.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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; + } } } |