Pip is now working with CI
[enigma2.git] / lib / dvb_ci / dvbci_resmgr.cpp
index df0fb8d034f9785231f305ed1abe0866b3da56db..e9e4bd1b12b394d10323df4d6e9ae0194d76581a 100644 (file)
@@ -24,6 +24,7 @@ int eDVBCIResourceManagerSession::receivedAPDU(const unsigned char *tag,const vo
                        else
                                for (int i=0; i<len; i++)
                                        printf("%02x ", ((const unsigned char*)data)[i]);
+
                        if (state == stateFirstProfileEnquiry)
                        {
                                // profile change
@@ -35,6 +36,7 @@ int eDVBCIResourceManagerSession::receivedAPDU(const unsigned char *tag,const vo
                        printf("unknown APDU tag 9F 80 %02x\n", tag[2]);
                }
        }
+       
        return 0;
 }
 
@@ -46,7 +48,7 @@ int eDVBCIResourceManagerSession::doAction()
        {
                const unsigned char tag[3]={0x9F, 0x80, 0x10}; // profile enquiry
                sendAPDU(tag);
-               state=stateFirstProfileEnquiry;
+               state = stateFirstProfileEnquiry;
                return 0;
        }
        case stateFirstProfileEnquiry:
@@ -56,6 +58,11 @@ int eDVBCIResourceManagerSession::doAction()
                state=stateProfileChange;
                return 0;
        }
+  case stateProfileChange:
+  {
+    printf("bla kaputt\n");
+    break;
+  }
        case stateProfileEnquiry:
        {
                const unsigned char tag[3]={0x9F, 0x80, 0x11};
@@ -64,10 +71,10 @@ int eDVBCIResourceManagerSession::doAction()
                                {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, 0x10, 0x00, 0x41}, // auth.
+//                             {0x00, 0x10, 0x00, 0x41}, // auth.
                        };
                sendAPDU(tag, data, sizeof(data));
                state=stateFinal;
@@ -76,6 +83,7 @@ int eDVBCIResourceManagerSession::doAction()
        case stateFinal:
                printf("stateFinal und action! kann doch garnicht sein ;)\n");
        default:
-               return 0;
+               break;
        }
+       return 0;
 }