summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-08-20 11:54:56 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2006-08-20 11:54:56 +0200
commitcac5cd37b8ff599c101a9af13247126f57cf8cbe (patch)
tree29f2fb6bfaa98ff1fdfc8a775ed7e7b16c3b8e54
parenta7c99052363e3738ebf8744f84b7a4b8b44f6d35 (diff)
downloadvdr-1.4.1-5.tar.gz
vdr-1.4.1-5.tar.bz2
Fixed handling "Ca Info" in case the CAM sends this again if the smart card is replaced with a different one1.4.1-5
-rw-r--r--HISTORY2
-rw-r--r--ci.c12
2 files changed, 9 insertions, 5 deletions
diff --git a/HISTORY b/HISTORY
index c221b8ad..29ba1e2e 100644
--- a/HISTORY
+++ b/HISTORY
@@ -4886,3 +4886,5 @@ Video Disk Recorder Revision History
- Added --remove-destination to the 'cp' command for binaries in the Makefile to
avoid a crash in case a new version is installed on a running system (suggested
by Petri Hintukainen).
+- Fixed handling "Ca Info" in case the CAM sends this again if the smart card is
+ replaced with a different one.
diff --git a/ci.c b/ci.c
index d1332dd4..066acc27 100644
--- a/ci.c
+++ b/ci.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: ci.c 1.44 2006/08/12 10:14:27 kls Exp $
+ * $Id: ci.c 1.45 2006/08/20 11:38:33 kls Exp $
*/
#include "ci.h"
@@ -985,6 +985,7 @@ bool cCiConditionalAccessSupport::Process(int Length, const uint8_t *Data)
switch (Tag) {
case AOT_CA_INFO: {
dbgprotocol("%d: <== Ca Info", SessionId());
+ numCaSystemIds = 0;
int l = 0;
const uint8_t *d = GetData(Data, l);
while (l > 1) {
@@ -992,13 +993,14 @@ bool cCiConditionalAccessSupport::Process(int Length, const uint8_t *Data)
dbgprotocol(" %04X", id);
d += 2;
l -= 2;
- if (numCaSystemIds < MAXCASYSTEMIDS) {
+ if (numCaSystemIds < MAXCASYSTEMIDS)
caSystemIds[numCaSystemIds++] = id;
- caSystemIds[numCaSystemIds] = 0;
- }
- else
+ else {
esyslog("ERROR: too many CA system IDs!");
+ break;
+ }
}
+ caSystemIds[numCaSystemIds] = 0;
dbgprotocol("\n");
}
state = 2; // got ca info