Re: [PATCH] cDevice::GetDeviceForTransponder(): fix a typo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 26.05.2016 17:58, glenvt18 wrote:
d->MaySwitchTransponder(Channel) is always false here

Please review,
Sergey Chernyavskiy.

---
 device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/device.c b/device.c
index 18867cd..542d120 100644
--- a/device.c
+++ b/device.c
@@ -342,7 +342,7 @@ cDevice *cDevice::GetDeviceForTransponder(const cChannel *Channel, int Priority)
          if (d->ProvidesTransponder(Channel)) {
             if (d->MaySwitchTransponder(Channel))
                Device = 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()) { // 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
                }

This was introduced in version 1.7.29:

--- device.c    2012/06/09 14:37:24     2.61
+++ device.c    2012/06/10 13:13:18     2.62
@@ -334,7 +334,7 @@
          if (d->ProvidesTransponder(Channel)) {
             if (d->MaySwitchTransponder(Channel))
                Device = d; // this device may switch to the transponder without disturbing any receiver or live view
-            else if (!d->Occupied()) {
+            else if (!d->Occupied() && d->MaySwitchTransponder(Channel)) { // 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
                }

with the change comment "Fixed handling recording with more than two bonded devices".

While I tend to agree with you in that d->MaySwitchTransponder(Channel) is always false here,
this must at least have fixed the problem at hand back then (it was the only file that
has been modified for this fix). I'm therefore hesitant to remove this call and
risk breaking something...

Klaus

_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
https://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr




[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux