summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2020-06-27 10:24:46 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2020-06-27 10:24:46 +0200
commita526eee1651ca643a3f3c88a0c852a43261a7ebb (patch)
treecba7a2f1b987c041e3a17966e228566a8f459bf6
parent848c65fe4f56b95bf26035296f77b091a16ae704 (diff)
downloadvdr-a526eee1651ca643a3f3c88a0c852a43261a7ebb.tar.gz
vdr-a526eee1651ca643a3f3c88a0c852a43261a7ebb.tar.bz2
Fixed the 'else if' branch in cDevice::GetDeviceForTransponder(), which hasn't been active since version 1.7.292.4.3
-rw-r--r--CONTRIBUTORS2
-rw-r--r--HISTORY7
-rw-r--r--device.c4
-rw-r--r--device.h7
-rw-r--r--dvbdevice.h3
5 files changed, 19 insertions, 4 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 31a662b6..ab656dc7 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -3612,6 +3612,8 @@ Helmut Binder <cco@aon.at>
'902' to make it valid for all countries
for adjusting device selection in GetDeviceForTransponder() to that in GetDevice()
for adding CRC check of the CAT in cCaPidReceiver::Receive()
+ for reporting that the 'else if' branch in cDevice::GetDeviceForTransponder() hasn't
+ been active since version 1.7.29
Ulrich Eckhardt <uli@uli-eckhardt.de>
for reporting a problem with shutdown after user inactivity in case a plugin is
diff --git a/HISTORY b/HISTORY
index 60e73480..d953a9db 100644
--- a/HISTORY
+++ b/HISTORY
@@ -9491,3 +9491,10 @@ Video Disk Recorder Revision History
- Now adding CPPFLAGS to CXXFLAGS to allow extra preprocessor flags to be given when
doing make (suggested by Tobisa Grimm).
- Added CRC check of the CAT in cCaPidReceiver::Receive() (thanks to Helmut Binder).
+- Fixed the 'else if' branch in cDevice::GetDeviceForTransponder(), which hasn't
+ been active since version 1.7.29 (reported by Helmut Binder). The original purpose of
+ this branch was to use a device that is currently not recording for switching to the
+ transponder of an upcoming VPS timer. However, this caused problems with more than
+ two bonded devices, which was "fixed" in version 1.7.29. Apparently this fix merely
+ rendered the whole code branch inactive. Now this branch is only executed for devices
+ that are not bonded.
diff --git a/device.c b/device.c
index 50120a9a..eba59c30 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c 4.33 2020/06/25 13:46:16 kls Exp $
+ * $Id: device.c 4.34 2020/06/27 10:24:46 kls Exp $
*/
#include "device.h"
@@ -427,7 +427,7 @@ cDevice *cDevice::GetDeviceForTransponder(const cChannel *Channel, int Priority)
if (d->ProvidesTransponder(Channel)) {
if (d->MaySwitchTransponder(Channel))
return d; // this device may switch to the transponder without disturbing any receiver or live view
- else if (!d->Occupied() && d->MaySwitchTransponder(Channel)) { // MaySwitchTransponder() implicitly calls Occupied()
+ else if (!d->Occupied() && !d->IsBonded()) { // MaySwitchTransponder() implicitly calls Occupied()
if (d->Priority() < Priority && (!Device || d->Priority() < Device->Priority()))
Device = d; // use this one only if no other with less impact can be found
}
diff --git a/device.h b/device.h
index bebc2d94..df0732f8 100644
--- a/device.h
+++ b/device.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.h 4.16 2020/06/10 14:52:43 kls Exp $
+ * $Id: device.h 4.17 2020/06/27 10:24:46 kls Exp $
*/
#ifndef __DEVICE_H
@@ -211,6 +211,11 @@ protected:
///< device (On = false), it should do so in this function.
///< A derived class must call the MakePrimaryDevice() function of its
///< base class.
+ virtual bool IsBonded(void) const { return false; }
+ ///< Returns true if this device is bonded to an other device.
+ ///< Only implemented by cDvbDevice and used in GetDeviceForTransponder().
+ ///< May be dropped in a future version, if a better solution is found.
+ ///< Do not use otherwise!
public:
bool IsPrimaryDevice(void) const { return this == primaryDevice && HasDecoder(); }
int CardIndex(void) const { return cardIndex; }
diff --git a/dvbdevice.h b/dvbdevice.h
index 4e8f82ee..b7d899d5 100644
--- a/dvbdevice.h
+++ b/dvbdevice.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbdevice.h 4.6 2019/03/10 12:01:15 kls Exp $
+ * $Id: dvbdevice.h 4.7 2020/06/27 10:24:46 kls Exp $
*/
#ifndef __DVBDEVICE_H
@@ -179,6 +179,7 @@ public:
///< Returns true if any devices are available.
protected:
int adapter, frontend;
+ virtual bool IsBonded(void) const { return bondedDevice; }
private:
int fd_dvr, fd_ca;
bool checkTsBuffer;