1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Removed the "bondedMasterFailed" mechanism from cDvbTuner

This commit is contained in:
Klaus Schmidinger 2012-05-09 08:33:59 +02:00
parent 06b8fe94ef
commit 0b4069c91f
3 changed files with 13 additions and 24 deletions

View File

@ -2880,3 +2880,7 @@ Marcus Roscher <dad401@gmx.de>
Reinhard Mantey <geronimo013@gmx.de>
for reporting a problem with character comparisons in
cSubtitleObject::DecodeCharacterString()
Michael Schneider <vdrportal_midas@gmx.de>
for reporting a problem with the EPG scan in case a transponder is not receivable in
a setup with bonded devices

View File

@ -7099,3 +7099,6 @@ Video Disk Recorder Revision History
- Renamed the function cString::sprintf(const char *fmt, va_list &ap) to vsprintf(),
because it might inadvertently be called with a 'char *' as the second argument on
some compilers and cause a crash (reported by Sundararaj Reel).
- Removed the "bondedMasterFailed" mechanism from cDvbTuner, because it caused
problems with the EPG scan in case a transponder is not receivable in a setup with
bonded devices (reported by Michael Schneider).

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.70 2012/04/04 09:49:12 kls Exp $
* $Id: dvbdevice.c 2.71 2012/05/09 08:33:59 kls Exp $
*/
#include "dvbdevice.h"
@ -303,7 +303,6 @@ private:
cCondVar newSet;
cDvbTuner *bondedTuner;
bool bondedMaster;
bool bondedMasterFailed;
bool SetFrontendType(const cChannel *Channel);
cString GetBondingParams(const cChannel *Channel = NULL) const;
void ClearEventQueue(void) const;
@ -348,7 +347,6 @@ cDvbTuner::cDvbTuner(const cDvbDevice *Device, int Fd_Frontend, int Adapter, int
tunerStatus = tsIdle;
bondedTuner = NULL;
bondedMaster = false;
bondedMasterFailed = false;
SetDescription("tuner on frontend %d/%d", adapter, frontend);
Start();
}
@ -438,12 +436,8 @@ cDvbTuner *cDvbTuner::GetBondedMaster(void)
if (!bondedTuner)
return this; // an unbonded tuner is always "master"
cMutexLock MutexLock(&bondMutex);
if (bondedMaster) {
if (!bondedMasterFailed)
if (bondedMaster)
return this;
else
bondedMaster = false;
}
// This tuner is bonded, but it's not the master, so let's see if there is a master at all:
if (cDvbTuner *t = bondedTuner) {
while (t != this) {
@ -453,18 +447,9 @@ cDvbTuner *cDvbTuner::GetBondedMaster(void)
}
}
// None of the other bonded tuners is master, so make this one the master:
cDvbTuner *t = this;
if (bondedMasterFailed) {
// This one has failed, so switch to the next one:
t = bondedTuner;
t->bondedMasterFailed = false;
cMutexLock MutexLock(&t->mutex);
t->channel = channel;
t->tunerStatus = tsSet;
}
t->bondedMaster = true;
dsyslog("tuner %d/%d is now bonded master", t->adapter, t->frontend);
return t;
bondedMaster = true;
dsyslog("tuner %d/%d is now bonded master", adapter, frontend);
return this;
}
bool cDvbTuner::IsTunedTo(const cChannel *Channel) const
@ -878,9 +863,6 @@ void cDvbTuner::Action(void)
isyslog("frontend %d/%d timed out while tuning to channel %d, tp %d", adapter, frontend, channel.Number(), channel.Transponder());
lastTimeoutReport = time(NULL);
}
cMutexLock MutexLock(&bondMutex);
if (bondedTuner && bondedMaster)
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