From 41f185b000d17b3b6ffddbe8e0a738869a92260f Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Mon, 16 Jan 2012 12:43:33 +0100 Subject: [PATCH] Fixed a high load in case a transponder can't be received --- HISTORY | 1 + dvbdevice.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/HISTORY b/HISTORY index 8f9f2477..5627c491 100644 --- a/HISTORY +++ b/HISTORY @@ -6842,3 +6842,4 @@ Video Disk Recorder Revision History - Revoked "Fixed handling symbolic links in cRecordings::ScanVideoDir()". This change actually broke handling symbolic links (see http://www.vdr-portal.de/board1-news/board2-vdr-news/p1047199-announce-vdr-developer-version-1-7-23/#post1047199). +- Fixed a high load in case a transponder can't be received. diff --git a/dvbdevice.c b/dvbdevice.c index 39153970..fa7306b1 100644 --- a/dvbdevice.c +++ b/dvbdevice.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbdevice.c 2.56 2012/01/15 14:31:47 kls Exp $ + * $Id: dvbdevice.c 2.57 2012/01/16 12:43:33 kls Exp $ */ #include "dvbdevice.h" @@ -857,6 +857,7 @@ void cDvbTuner::Action(void) if (GetFrontendStatus(NewStatus)) Status = NewStatus; cMutexLock MutexLock(&mutex); + int WaitTime = 1000; switch (tunerStatus) { case tsIdle: break; @@ -877,6 +878,7 @@ void cDvbTuner::Action(void) bondedMasterFailed = true; // give an other tuner a chance in case the sat cable was disconnected continue; } + WaitTime = 100; // allows for a quick change from tsTuned to tsLocked case tsLocked: if (Status & FE_REINIT) { tunerStatus = tsSet; @@ -905,9 +907,7 @@ void cDvbTuner::Action(void) break; default: esyslog("ERROR: unknown tuner status %d", tunerStatus); } - - if (tunerStatus != tsTuned) - newSet.TimedWait(mutex, 1000); + newSet.TimedWait(mutex, WaitTime); } }