small fix dvbci

Origin commit data
------------------
Branch: master
Commit: 03c577f38b
Author: DboxOldie <DboxOdlie@users.noreply.github.com>
Date: 2020-01-17 (Fri, 17 Jan 2020)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
DboxOldie
2020-01-17 21:29:00 +01:00
committed by vanhofen
parent 56ca54bab9
commit cbbbc504f8
4 changed files with 60 additions and 4 deletions

View File

@@ -14,6 +14,40 @@
eDVBCISession* eDVBCISession::sessions[SLMS];
eDVBCIHostControlSession::eDVBCIHostControlSession(eDVBCISlot *tslot)
{
slot = tslot;
}
eDVBCIHostControlSession::~eDVBCIHostControlSession()
{
}
int eDVBCIHostControlSession::receivedAPDU(const unsigned char *tag,const void *data, int len)
{
printf("CI HC SESSION(%d)/TAG %02x %02x %02x: ", session_nb, tag[0], tag[1], tag[2]);
for (int i=0; i<len; i++)
printf("%02x ", ((const unsigned char*)data)[i]);
printf("\n");
return 0;
}
int eDVBCIHostControlSession::doAction()
{
switch (state)
{
case stateStarted:
{
const unsigned char tag[3] = {0x9F, 0x80, 0x20}; // application manager info
sendAPDU(tag);
state = stateFinal;
return 1;
}
default:
return 0;
}
}
int eDVBCISession::buildLengthField(unsigned char *pkt, int len)
{
if (len < 127)
@@ -180,12 +214,16 @@ eDVBCISession* eDVBCISession::createSession(eDVBCISlot *slot, const unsigned cha
sessions[session_nb - 1] = new eDVBCIContentControlManagerSession(slot);
break;
} // fall through
case 0x00200041:
sessions[session_nb - 1] = new eDVBCIHostControlSession(slot);
printf("[CI SESS] Host Control\n");
break;
case 0x00100041:
// session=new eDVBCIAuthSession;
printf("[CI SESS] AuthSession\n");
// break;
// fall through
case 0x00200041:
case 0x008e1001:
default:
printf("[CI SESS] unknown resource type %02x %02x %02x %02x\n", resource_identifier[0], resource_identifier[1], resource_identifier[2], resource_identifier[3]);
sessions[session_nb - 1] = 0;