git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
revert non working "goto standby" after timerevent code (needs some work in
[enigma2.git]
/
lib
/
dvb_ci
/
dvbci_resmgr.cpp
diff --git
a/lib/dvb_ci/dvbci_resmgr.cpp
b/lib/dvb_ci/dvbci_resmgr.cpp
index df0fb8d034f9785231f305ed1abe0866b3da56db..7382bf2efa347beeb159dca504ae9e90b6f16bd1 100644
(file)
--- a/
lib/dvb_ci/dvbci_resmgr.cpp
+++ b/
lib/dvb_ci/dvbci_resmgr.cpp
@@
-1,29
+1,31
@@
/* DVB CI Resource Manager */
/* DVB CI Resource Manager */
+#include <lib/base/eerror.h>
#include <lib/dvb_ci/dvbci_resmgr.h>
int eDVBCIResourceManagerSession::receivedAPDU(const unsigned char *tag,const void *data, int len)
{
#include <lib/dvb_ci/dvbci_resmgr.h>
int eDVBCIResourceManagerSession::receivedAPDU(const unsigned char *tag,const void *data, int len)
{
-
printf
("SESSION(%d) %02x %02x %02x: ", session_nb, tag[0], tag[1], tag[2]);
+
eDebugNoNewLine
("SESSION(%d) %02x %02x %02x: ", session_nb, tag[0], tag[1], tag[2]);
for (int i=0; i<len; i++)
for (int i=0; i<len; i++)
-
printf
("%02x ", ((const unsigned char*)data)[i]);
-
printf("\n
");
+
eDebugNoNewLine
("%02x ", ((const unsigned char*)data)[i]);
+
eDebug("
");
if ((tag[0]==0x9f) && (tag[1]==0x80))
{
switch (tag[2])
{
case 0x10: // profile enquiry
if ((tag[0]==0x9f) && (tag[1]==0x80))
{
switch (tag[2])
{
case 0x10: // profile enquiry
-
printf("cam fragt was ich kann.\n
");
+
eDebug("cam fragt was ich kann.
");
state=stateProfileEnquiry;
return 1;
break;
case 0x11: // Tprofile
state=stateProfileEnquiry;
return 1;
break;
case 0x11: // Tprofile
-
printf
("mein cam kann: ");
+
eDebugNoNewLine
("mein cam kann: ");
if (!len)
if (!len)
-
printf("nichts\n
");
+
eDebug("nichts
");
else
for (int i=0; i<len; i++)
else
for (int i=0; i<len; i++)
- printf("%02x ", ((const unsigned char*)data)[i]);
+ eDebugNoNewLine("%02x ", ((const unsigned char*)data)[i]);
+
if (state == stateFirstProfileEnquiry)
{
// profile change
if (state == stateFirstProfileEnquiry)
{
// profile change
@@
-32,9
+34,10
@@
int eDVBCIResourceManagerSession::receivedAPDU(const unsigned char *tag,const vo
state=stateFinal;
break;
default:
state=stateFinal;
break;
default:
-
printf("unknown APDU tag 9F 80 %02x\n
", tag[2]);
+
eDebug("unknown APDU tag 9F 80 %02x
", tag[2]);
}
}
}
}
+
return 0;
}
return 0;
}
@@
-46,7
+49,7
@@
int eDVBCIResourceManagerSession::doAction()
{
const unsigned char tag[3]={0x9F, 0x80, 0x10}; // profile enquiry
sendAPDU(tag);
{
const unsigned char tag[3]={0x9F, 0x80, 0x10}; // profile enquiry
sendAPDU(tag);
- state
=
stateFirstProfileEnquiry;
+ state
=
stateFirstProfileEnquiry;
return 0;
}
case stateFirstProfileEnquiry:
return 0;
}
case stateFirstProfileEnquiry:
@@
-56,6
+59,11
@@
int eDVBCIResourceManagerSession::doAction()
state=stateProfileChange;
return 0;
}
state=stateProfileChange;
return 0;
}
+ case stateProfileChange:
+ {
+ eDebug("bla kaputt");
+ break;
+ }
case stateProfileEnquiry:
{
const unsigned char tag[3]={0x9F, 0x80, 0x11};
case stateProfileEnquiry:
{
const unsigned char tag[3]={0x9F, 0x80, 0x11};
@@
-64,18
+72,19
@@
int eDVBCIResourceManagerSession::doAction()
{0x00, 0x01, 0x00, 0x41},
{0x00, 0x02, 0x00, 0x41},
{0x00, 0x03, 0x00, 0x41},
{0x00, 0x01, 0x00, 0x41},
{0x00, 0x02, 0x00, 0x41},
{0x00, 0x03, 0x00, 0x41},
- {0x00, 0x20, 0x00, 0x41},
+// {0x00, 0x20, 0x00, 0x41}, // host control
{0x00, 0x24, 0x00, 0x41},
{0x00, 0x40, 0x00, 0x41},
{0x00, 0x24, 0x00, 0x41},
{0x00, 0x40, 0x00, 0x41},
-
{0x00, 0x10, 0x00, 0x41}, // auth.
+
//
{0x00, 0x10, 0x00, 0x41}, // auth.
};
sendAPDU(tag, data, sizeof(data));
state=stateFinal;
return 0;
}
case stateFinal:
};
sendAPDU(tag, data, sizeof(data));
state=stateFinal;
return 0;
}
case stateFinal:
-
printf("stateFinal und action! kann doch garnicht sein ;)\n
");
+
eDebug("stateFinal und action! kann doch garnicht sein ;)
");
default:
default:
-
return 0
;
+
break
;
}
}
+ return 0;
}
}