summaryrefslogtreecommitdiff
path: root/eit.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2003-04-25 14:46:22 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2003-04-25 14:46:22 +0200
commitf53912de1e265edbf166eac640b5509b0fd25356 (patch)
tree6335b1d294bf54999ee25135046ff6aaa7938ee8 /eit.c
parent6fc02ebd08ea07686d99db6b37c75a82f4c6e3d1 (diff)
downloadvdr-f53912de1e265edbf166eac640b5509b0fd25356.tar.gz
vdr-f53912de1e265edbf166eac640b5509b0fd25356.tar.bz2
Now sending CA descriptors to the CAM in the same sequence as they were originally received
Diffstat (limited to 'eit.c')
-rw-r--r--eit.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/eit.c b/eit.c
index 2bab1a51..242b51bd 100644
--- a/eit.c
+++ b/eit.c
@@ -16,7 +16,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: eit.c 1.72 2003/04/21 13:21:54 kls Exp $
+ * $Id: eit.c 1.73 2003/04/25 14:45:32 kls Exp $
***************************************************************************/
#include "eit.h"
@@ -1444,18 +1444,21 @@ int cSIProcessor::GetCaDescriptors(int Source, int Transponder, int ServiceId, c
if (BufSize > 0 && Data) {
cMutexLock MutexLock(&caDescriptorsMutex);
int length = 0;
- do {
- for (cCaDescriptor *d = caDescriptors.First(); d; d = caDescriptors.Next(d)) {
- if (d->source == Source && d->transponder == Transponder && d->serviceId == ServiceId && d->caSystem == *CaSystemIds) {
- if (length + d->Length() <= BufSize) {
- memcpy(Data + length, d->Data(), d->Length());
- length += d->Length();
+ for (cCaDescriptor *d = caDescriptors.First(); d; d = caDescriptors.Next(d)) {
+ if (d->source == Source && d->transponder == Transponder && d->serviceId == ServiceId) {
+ const unsigned short *caids = CaSystemIds;
+ do {
+ if (d->caSystem == *caids) {
+ if (length + d->Length() <= BufSize) {
+ memcpy(Data + length, d->Data(), d->Length());
+ length += d->Length();
+ }
+ else
+ return -1;
}
- else
- return -1;
- }
+ } while (*++caids);
}
- } while (*++CaSystemIds);
+ }
return length;
}
return -1;