summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
authorMarkus Ehrnsperger <markus@vdr1.(none)>2011-01-23 22:20:57 +0100
committerMarkus Ehrnsperger <markus@vdr1.(none)>2011-01-23 22:20:57 +0100
commitac9d15a2a4e62971aee7932e55aa2d924f9b0261 (patch)
tree094246c234bce8f91e226d758f8437d62d095990 /vdr.c
parent58db02442b375f5669416e6e744a8325ed363f99 (diff)
downloadvdr-patch-lnbsharing-ac9d15a2a4e62971aee7932e55aa2d924f9b0261.tar.gz
vdr-patch-lnbsharing-ac9d15a2a4e62971aee7932e55aa2d924f9b0261.tar.bz2
lnb-sharing 0.1.0lnb-sharing-0.1.0
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/vdr.c b/vdr.c
index 93f586a..6825363 100644
--- a/vdr.c
+++ b/vdr.c
@@ -880,23 +880,27 @@ int main(int argc, char *argv[])
if (d->MaySwitchTransponder()) {
DeviceAvailable = true; // avoids using the actual device below
if (timeout)
- Device = d; // only check other devices if they have been left alone for a while
+ // Device = d; // only check other devices if they have been left alone for a while
+ if( d->GetMaxBadPriority(Timer->Channel()) <= 0) Device = d; // LNB Sharing
}
else if (timeout && !Device && InVpsMargin && !d->Receiving() && d->ProvidesTransponderExclusively(Timer->Channel()))
- Device = d; // use this one only if no other with less impact can be found
- }
+ // Device = d; // use this one only if no other with less impact can be found
+ if( d->GetMaxBadPriority(Timer->Channel()) <= 0) Device = d; // LNB Sharing
+ }
}
if (!Device && InVpsMargin && !DeviceAvailable) {
cDevice *d = cDevice::ActualDevice();
if (!d->Receiving() && d->ProvidesTransponder(Timer->Channel()) && Now - DeviceUsed[d->DeviceNumber()] > TIMERDEVICETIMEOUT)
- Device = d; // use the actual device as a last resort
+ // Device = d; // use the actual device as a last resort
+ if( d->GetMaxBadPriority(Timer->Channel()) <= 0) Device = d; // LNB Sharing
+
}
// Switch the device to the transponder:
if (Device) {
if (!Device->IsTunedToTransponder(Timer->Channel())) {
if (Device == cDevice::ActualDevice() && !Device->IsPrimaryDevice())
cDevice::PrimaryDevice()->StopReplay(); // stop transfer mode
- dsyslog("switching device %d to channel %d", Device->DeviceNumber() + 1, Timer->Channel()->Number());
+ dsyslog("VDR: switching device %d to channel %d", Device->DeviceNumber() + 1, Timer->Channel()->Number());
Device->SwitchChannel(Timer->Channel(), false);
DeviceUsed[Device->DeviceNumber()] = Now;
}