summaryrefslogtreecommitdiff
path: root/dvbdevice.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2013-02-19 10:24:39 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2013-02-19 10:24:39 +0100
commit851318c9b4c2be793b9cd96c6440ef96d82ae587 (patch)
tree2e3cb9e7eb9afc97ff17ce99e2356782011f8753 /dvbdevice.c
parent39ad232ee59bb860fd6f29aeba8067e8ad2a0bdb (diff)
downloadvdr-851318c9b4c2be793b9cd96c6440ef96d82ae587.tar.gz
vdr-851318c9b4c2be793b9cd96c6440ef96d82ae587.tar.bz2
Fixed a possible deadlock in handling the tuners of bonded devices
Diffstat (limited to 'dvbdevice.c')
-rw-r--r--dvbdevice.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/dvbdevice.c b/dvbdevice.c
index 7007ad64..97628b21 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.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"
@@ -307,6 +307,7 @@ private:
bool bondedMaster;
bool SetFrontendType(const cChannel *Channel);
cString GetBondingParams(const cChannel *Channel = NULL) const;
+ cDvbTuner *GetBondedMaster(void);
void ClearEventQueue(void) const;
bool GetFrontendStatus(fe_status_t &Status) const;
void ExecuteDiseqc(const cDiseqc *Diseqc, unsigned int *Frequency);
@@ -320,7 +321,6 @@ public:
bool Bond(cDvbTuner *Tuner);
void UnBond(void);
bool BondingOk(const cChannel *Channel, bool ConsiderOccupied = false) const;
- cDvbTuner *GetBondedMaster(void);
const cChannel *GetTransponder(void) const { return &channel; }
uint32_t SubsystemId(void) const { return subsystemId; }
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)) {
frequency -= diseqc->Lof();
if (diseqc != lastDiseqc || diseqc->IsScr()) {
- if (GetBondedMaster() == this) {
+ if (!bondedTuner || bondedMaster) {
ExecuteDiseqc(diseqc, &frequency);
if (frequency == 0)
return false;
@@ -768,7 +768,7 @@ bool cDvbTuner::SetFrontend(void)
tone = SEC_TONE_ON;
}
int volt = (dtp.Polarization() == 'V' || dtp.Polarization() == 'R') ? SEC_VOLTAGE_13 : SEC_VOLTAGE_18;
- if (GetBondedMaster() != this) {
+ if (bondedTuner && !bondedMaster) {
tone = SEC_TONE_OFF;
volt = SEC_VOLTAGE_13;
}