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

Fixed a possible deadlock in handling the tuners of bonded devices

This commit is contained in:
Klaus Schmidinger 2013-02-19 10:24:39 +01:00
parent 39ad232ee5
commit 851318c9b4
3 changed files with 7 additions and 4 deletions

View File

@ -2898,6 +2898,7 @@ Juergen Lock <vdr-l@jelal.kn-bremen.de>
for reporting a problem with device bondings for devices that don't provide DVB-S for reporting a problem with device bondings for devices that don't provide DVB-S
in case, for instance, there is now a DVB-T device where there used to be a bonded in case, for instance, there is now a DVB-T device where there used to be a bonded
DVB-S device DVB-S device
for fixing a possible deadlock in handling the tuners of bonded devices
Sergiu Dotenco <sergiu.dotenco@googlemail.com> Sergiu Dotenco <sergiu.dotenco@googlemail.com>
for reporting a missing initialization in sDvbSpuRect for reporting a missing initialization in sDvbSpuRect

View File

@ -7657,3 +7657,5 @@ Video Disk Recorder Revision History
- Updated the Swedish OSD texts (thanks to Richard Lithvall). - Updated the Swedish OSD texts (thanks to Richard Lithvall).
- Now clearing device bondings for devices that don't provide DVB-S in the Setup/LNB - Now clearing device bondings for devices that don't provide DVB-S in the Setup/LNB
menu (reported by Juergen Lock). menu (reported by Juergen Lock).
- Fixed a possible deadlock in handling the tuners of bonded devices (thanks to
Juergen Lock).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: dvbdevice.c 2.80 2013/02/17 13:17:33 kls Exp $ * $Id: dvbdevice.c 2.81 2013/02/19 10:24:39 kls Exp $
*/ */
#include "dvbdevice.h" #include "dvbdevice.h"
@ -307,6 +307,7 @@ private:
bool bondedMaster; bool bondedMaster;
bool SetFrontendType(const cChannel *Channel); bool SetFrontendType(const cChannel *Channel);
cString GetBondingParams(const cChannel *Channel = NULL) const; cString GetBondingParams(const cChannel *Channel = NULL) const;
cDvbTuner *GetBondedMaster(void);
void ClearEventQueue(void) const; void ClearEventQueue(void) const;
bool GetFrontendStatus(fe_status_t &Status) const; bool GetFrontendStatus(fe_status_t &Status) const;
void ExecuteDiseqc(const cDiseqc *Diseqc, unsigned int *Frequency); void ExecuteDiseqc(const cDiseqc *Diseqc, unsigned int *Frequency);
@ -320,7 +321,6 @@ public:
bool Bond(cDvbTuner *Tuner); bool Bond(cDvbTuner *Tuner);
void UnBond(void); void UnBond(void);
bool BondingOk(const cChannel *Channel, bool ConsiderOccupied = false) const; bool BondingOk(const cChannel *Channel, bool ConsiderOccupied = false) const;
cDvbTuner *GetBondedMaster(void);
const cChannel *GetTransponder(void) const { return &channel; } const cChannel *GetTransponder(void) const { return &channel; }
uint32_t SubsystemId(void) const { return subsystemId; } uint32_t SubsystemId(void) const { return subsystemId; }
bool IsTunedTo(const cChannel *Channel) const; bool IsTunedTo(const cChannel *Channel) const;
@ -742,7 +742,7 @@ bool cDvbTuner::SetFrontend(void)
if (const cDiseqc *diseqc = Diseqcs.Get(device->CardIndex() + 1, channel.Source(), frequency, dtp.Polarization(), &scr)) { if (const cDiseqc *diseqc = Diseqcs.Get(device->CardIndex() + 1, channel.Source(), frequency, dtp.Polarization(), &scr)) {
frequency -= diseqc->Lof(); frequency -= diseqc->Lof();
if (diseqc != lastDiseqc || diseqc->IsScr()) { if (diseqc != lastDiseqc || diseqc->IsScr()) {
if (GetBondedMaster() == this) { if (!bondedTuner || bondedMaster) {
ExecuteDiseqc(diseqc, &frequency); ExecuteDiseqc(diseqc, &frequency);
if (frequency == 0) if (frequency == 0)
return false; return false;
@ -768,7 +768,7 @@ bool cDvbTuner::SetFrontend(void)
tone = SEC_TONE_ON; tone = SEC_TONE_ON;
} }
int volt = (dtp.Polarization() == 'V' || dtp.Polarization() == 'R') ? SEC_VOLTAGE_13 : SEC_VOLTAGE_18; int volt = (dtp.Polarization() == 'V' || dtp.Polarization() == 'R') ? SEC_VOLTAGE_13 : SEC_VOLTAGE_18;
if (GetBondedMaster() != this) { if (bondedTuner && !bondedMaster) {
tone = SEC_TONE_OFF; tone = SEC_TONE_OFF;
volt = SEC_VOLTAGE_13; volt = SEC_VOLTAGE_13;
} }