Fixed a high load in case a transponder can't be received

This commit is contained in:
Klaus Schmidinger 2012-01-16 12:43:33 +01:00
parent 98a443cc61
commit 41f185b000
2 changed files with 5 additions and 4 deletions

View File

@ -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.

View File

@ -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);
}
}