summaryrefslogtreecommitdiff
path: root/server/connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'server/connection.c')
-rw-r--r--server/connection.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/server/connection.c b/server/connection.c
index 3bf0ad5..a73470b 100644
--- a/server/connection.c
+++ b/server/connection.c
@@ -318,10 +318,19 @@ cDevice* cServerConnection::CheckDevice(const cChannel *Channel, int Priority, b
imp <<= 8; imp |= min(max(device->Priority() + MAXPRIORITY, 0), 0xFF); // use the device with the lowest priority (+MAXPRIORITY to assure that values -99..99 can be used)
imp <<= 8; imp |= min(max((NumUsableSlots ? SlotPriority[j] : 0) + MAXPRIORITY, 0), 0xFF); // use the CAM slot with the lowest priority (+MAXPRIORITY to assure that values -99..99 can be used)
imp <<= 1; imp |= ndr; // avoid devices if we need to detach existing receivers
+#if VDRVERSNUM < 10719
imp <<= 1; imp |= device->IsPrimaryDevice(); // avoid the primary device
+#endif
imp <<= 1; imp |= NumUsableSlots ? 0 : device->HasCi(); // avoid cards with Common Interface for FTA channels
+#if VDRVERSNUM < 10719
imp <<= 1; imp |= device->HasDecoder(); // avoid full featured cards
+#else
+ imp <<= 1; imp |= device->AvoidRecording(); // avoid SD full featured cards
+#endif
imp <<= 1; imp |= NumUsableSlots ? !ChannelCamRelations.CamDecrypt(Channel->GetChannelID(), j + 1) : 0; // prefer CAMs that are known to decrypt this channel
+#if VDRVERSNUM >= 10719
+ imp <<= 1; imp |= device->IsPrimaryDevice(); // avoid the primary device
+#endif
if (imp < Impact) {
// This device has less impact than any previous one, so we take it.
Impact = imp;