From 76c498c2a9bfcc7fecb8a664bbfa5961a7b85960 Mon Sep 17 00:00:00 2001 From: max10 Date: Wed, 4 Jun 2014 22:07:42 +0200 Subject: [PATCH] . --- libduckbox/hardware_caps.c | 1 - libdvbci/dvbci_camgr.cpp | 2 +- libdvbci/dvbci_resmgr.cpp | 2 +- libdvbci/dvbci_session.cpp | 4 +++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/libduckbox/hardware_caps.c b/libduckbox/hardware_caps.c index 7ba32d1..a6316c2 100644 --- a/libduckbox/hardware_caps.c +++ b/libduckbox/hardware_caps.c @@ -26,7 +26,6 @@ hw_caps_t *get_hwcaps(void) memset(&caps, 0, sizeof(hw_caps_t)); initialized = 1; - const char *tmp; char buf[64]; int len = -1; int fd = open("/proc/stb/info/model", O_RDONLY); diff --git a/libdvbci/dvbci_camgr.cpp b/libdvbci/dvbci_camgr.cpp index 8bfdef1..546a97d 100644 --- a/libdvbci/dvbci_camgr.cpp +++ b/libdvbci/dvbci_camgr.cpp @@ -36,7 +36,7 @@ int eDVBCICAManagerSession::receivedAPDU(const unsigned char *tag, const void *d printf("%04x ", (((const unsigned char*)data)[i] << 8) | (((const unsigned char*)data)[i + 1])); caids.push_back((((const unsigned char*)data)[i] << 8) | (((const unsigned char*)data)[i + 1])); } - sort(caids.begin(), caids.end()); + std::sort(caids.begin(), caids.end()); printf("\n"); slot->pollConnection = false; diff --git a/libdvbci/dvbci_resmgr.cpp b/libdvbci/dvbci_resmgr.cpp index c7706b0..bb02552 100644 --- a/libdvbci/dvbci_resmgr.cpp +++ b/libdvbci/dvbci_resmgr.cpp @@ -36,7 +36,7 @@ int eDVBCIResourceManagerSession::receivedAPDU(const unsigned char *tag, const v state = stateFinal; break; default: - printf("%s %s unknown APDU tag 9F 80 %02x\n", tag[2], FILENAME, __FUNCTION__); + printf("%s %s unknown APDU tag 9F 80 %02x\n", FILENAME, __FUNCTION__, tag[2]); } } return 0; diff --git a/libdvbci/dvbci_session.cpp b/libdvbci/dvbci_session.cpp index 31fcdba..e1a7cdf 100644 --- a/libdvbci/dvbci_session.cpp +++ b/libdvbci/dvbci_session.cpp @@ -88,6 +88,7 @@ void eDVBCISession::sendSPDU(tSlot *slot, unsigned char tag, const void *data, i if (apdu) memcpy(ptr, apdu, alen); + ptr += alen; sendData(slot, pkt, ptr - pkt); } @@ -110,6 +111,7 @@ void eDVBCISession::recvCreateSessionResponse(const unsigned char *data) void eDVBCISession::recvCloseSessionRequest(const unsigned char *data) { + status = data[0]; state = stateInDeletion; action = 1; printf("close Session Request\n"); @@ -145,7 +147,7 @@ eDVBCISession* eDVBCISession::createSession(tSlot *slot, const unsigned char *re tag |= resource_identifier[2] << 8; tag |= resource_identifier[3]; - printf("Tag: %08X\n", tag); + printf("Tag: %08lx\n", tag); switch (tag) {