From f6ecb88ba0b259039e36b88f4691bce0b690886e Mon Sep 17 00:00:00 2001 From: max_10 Date: Sat, 28 Oct 2017 22:29:12 +0200 Subject: [PATCH] libdvbci: log cosmetic --- common/ca_ci.cpp | 2 +- libdvbci/dvbci_appmgr.cpp | 6 +++--- libdvbci/dvbci_session.cpp | 14 +++++++------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/common/ca_ci.cpp b/common/ca_ci.cpp index 165f13d..8ea87a9 100644 --- a/common/ca_ci.cpp +++ b/common/ca_ci.cpp @@ -863,7 +863,7 @@ bool cCA::SendCAPMT(u64 tpid, u8 source, u8 camask, const unsigned char * cabuf, if ((*It)->multi && (*It)->TP == TP && (*It)->source == source && !sid_found && (*It)->ci_use_count < CI_MAX_MULTI) { int pos = 3; - + (*It)->SID[(*It)->ci_use_count] = SID; (*It)->ci_use_count++; diff --git a/libdvbci/dvbci_appmgr.cpp b/libdvbci/dvbci_appmgr.cpp index de95912..1e69bfa 100644 --- a/libdvbci/dvbci_appmgr.cpp +++ b/libdvbci/dvbci_appmgr.cpp @@ -82,11 +82,11 @@ int eDVBCIApplicationManagerSession::doAction() return 1; } case stateFinal: - printf("[CI AM] in final state."); + printf("[CI AM] in final state.\n"); wantmenu = 0; if (wantmenu) { - printf("[CI AM] wantmenu: sending Tenter_menu"); + printf("[CI AM] wantmenu: sending Tenter_menu\n"); const unsigned char tag[3] = {0x9F, 0x80, 0x22}; // Tenter_menu sendAPDU(tag); wantmenu = 0; @@ -101,7 +101,7 @@ int eDVBCIApplicationManagerSession::doAction() int eDVBCIApplicationManagerSession::startMMI() { - printf("[CI AM] in appmanager -> startmmi()"); + printf("[CI AM] in appmanager -> startmmi()\n"); const unsigned char tag[3] = {0x9F, 0x80, 0x22}; // Tenter_menu sendAPDU(tag); slot->mmiOpened = true; diff --git a/libdvbci/dvbci_session.cpp b/libdvbci/dvbci_session.cpp index eee71b9..7618526 100644 --- a/libdvbci/dvbci_session.cpp +++ b/libdvbci/dvbci_session.cpp @@ -36,7 +36,7 @@ int eDVBCISession::buildLengthField(unsigned char *pkt, int len) } else { - printf("too big length\n"); + printf("[CI SESS] too big length\n"); exit(0); } } @@ -97,7 +97,7 @@ void eDVBCISession::sendOpenSessionResponse(eDVBCISlot *slot, unsigned char sess { char pkt[6]; pkt[0] = session_status; - printf("[CI SESS] sendOpenSessionResponse"); + printf("[CI SESS] sendOpenSessionResponse\n"); memcpy(pkt + 1, resource_identifier, 4); sendSPDU(slot, 0x92, pkt, 5, session_nb); } @@ -148,7 +148,7 @@ eDVBCISession* eDVBCISession::createSession(eDVBCISlot *slot, const unsigned cha tag |= resource_identifier[2] << 8; tag |= resource_identifier[3]; - printf("[CI SESS] Tag: %08lx > ", tag); + printf("[CI SESS] Tag: %08lx >\n", tag); switch (tag) { @@ -211,7 +211,7 @@ eDVBCISession* eDVBCISession::createSession(eDVBCISlot *slot, const unsigned cha void eDVBCISession::handleClose() { - printf("%s\n", __FUNCTION__); + printf("[CI SESS] %s\n", __FUNCTION__); unsigned char data[1] = {0x00}; sendSPDU(0x96, data, 1, 0, 0); @@ -253,13 +253,13 @@ void eDVBCISession::receiveData(eDVBCISlot *slot, const unsigned char *ptr, size unsigned char tag = *pkt++; int llen, hlen; - printf("[CI SESS] slot: %p",slot); + printf("[CI SESS] receiveData slot: %p > ",slot); #if 0 for(unsigned int i = 0; i < len; i++) printf("%02x ", ptr[i]); - printf("\n"); #endif + printf("\n"); llen = parseLengthField(pkt, hlen); pkt += llen; @@ -307,7 +307,7 @@ void eDVBCISession::receiveData(eDVBCISlot *slot, const unsigned char *ptr, size session->recvCreateSessionResponse(pkt); break; case 0x95: - printf("[CI SESS] recvCloseSessionRequest"); + printf("[CI SESS] recvCloseSessionRequest\n"); session->recvCloseSessionRequest(pkt); break; default: