diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2017-01-09 14:27:36 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2017-01-09 14:27:36 +0100 |
commit | 196f2af596509a318d4f5a83009167ea2bdcf61f (patch) | |
tree | 7783e0f23eacfb2601ba73100cf955f235e45ac6 | |
parent | d1ddb3978185ce8b3a7f783fac74b82a352fd650 (diff) | |
download | vdr-196f2af596509a318d4f5a83009167ea2bdcf61f.tar.gz vdr-196f2af596509a318d4f5a83009167ea2bdcf61f.tar.bz2 |
The mechanism of trying different CAMs when switching to an encrypted channel is now only triggered if there acually is more than one CAM in the system
-rw-r--r-- | HISTORY | 3 | ||||
-rw-r--r-- | device.c | 16 |
2 files changed, 11 insertions, 8 deletions
@@ -8894,4 +8894,5 @@ Video Disk Recorder Revision History by Dietmar Spingler). This speeds up switching to encrypted channels after newly starting VDR, in case there is more than one CAM in the system. - Fixed a flaw in handling timeouts for encrypted channels. - +- The mechanism of trying different CAMs when switching to an encrypted channel is + now only triggered if there acually is more than one CAM in the system. @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.c 4.4 2017/01/09 12:51:05 kls Exp $ + * $Id: device.c 4.5 2017/01/09 14:25:38 kls Exp $ */ #include "device.h" @@ -1678,12 +1678,14 @@ bool cDevice::AttachReceiver(cReceiver *Receiver) Unlock(); if (camSlot && Receiver->priority > MINPRIORITY) { // priority check to avoid an infinite loop with the CAM slot's caPidReceiver camSlot->StartDecrypting(); - startScrambleDetection = time(NULL); - scramblingTimeout = TS_SCRAMBLING_TIMEOUT; - bool KnownToDecrypt = ChannelCamRelations.CamDecrypt(Receiver->ChannelID(), camSlot->SlotNumber()); - if (KnownToDecrypt) - scramblingTimeout *= 10; // give it time to receive ECM/EMM - dsyslog("CAM %d: %sknown to decrypt channel %s (scramblingTimeout = %ds)", camSlot->SlotNumber(), KnownToDecrypt ? "" : "not ", *Receiver->ChannelID().ToString(), scramblingTimeout); + if (CamSlots.Count() > 1) { // don't try different CAMs if there is only one + startScrambleDetection = time(NULL); + scramblingTimeout = TS_SCRAMBLING_TIMEOUT; + bool KnownToDecrypt = ChannelCamRelations.CamDecrypt(Receiver->ChannelID(), camSlot->SlotNumber()); + if (KnownToDecrypt) + scramblingTimeout *= 10; // give it time to receive ECM/EMM + dsyslog("CAM %d: %sknown to decrypt channel %s (scramblingTimeout = %ds)", camSlot->SlotNumber(), KnownToDecrypt ? "" : "not ", *Receiver->ChannelID().ToString(), scramblingTimeout); + } } Start(); return true; |