From 5becd0019c3f5adacd771b87f4b361423cb44ca0 Mon Sep 17 00:00:00 2001 From: TangoCash Date: Mon, 6 Nov 2017 17:41:52 +0100 Subject: [PATCH] CI: fix some caid issues (thx dboxoldie) Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/17f98ccce13ec207219407f193a015c424c722c6 Author: TangoCash Date: 2017-11-06 (Mon, 06 Nov 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libdvbci/dvbci_camgr.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/libdvbci/dvbci_camgr.cpp b/libdvbci/dvbci_camgr.cpp index c56ac16..24917f3 100644 --- a/libdvbci/dvbci_camgr.cpp +++ b/libdvbci/dvbci_camgr.cpp @@ -36,11 +36,19 @@ int eDVBCICAManagerSession::receivedAPDU(const unsigned char *tag, const void *d caids.push_back((((const unsigned char*)data)[i] << 8) | (((const unsigned char*)data)[i + 1])); } if (!caids.empty()) - if ((caids[0] & 0xFF00) == 0x1800) + { + for (u32 i = 0; i < caids.size(); i++) { - caids.push_back(0x186A); - printf("%04x", 0x186A); + if (caids[i] == 0x1830) + { + caids.push_back(0x186A); + printf("%04x ", 0x186A); + caids.push_back(0x186D); + printf("%04x ", 0x186D); + break; + } } + } std::sort(caids.begin(), caids.end()); printf("\n");