mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-26 15:02:43 +02:00
test c**
Origin commit data
------------------
Branch: master
Commit: fe8b1237ac
Author: max_10 <max_10@gmx.de>
Date: 2015-11-10 (Tue, 10 Nov 2015)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -31,8 +31,6 @@
|
||||
#define x_debug 1
|
||||
#define y_debug 0
|
||||
|
||||
#define tricky 0
|
||||
|
||||
#define TAG_MENU_ANSWER 0x9f880b
|
||||
#define TAG_ENTER_MENU 0x9f8022
|
||||
|
||||
@@ -996,13 +994,6 @@ void cCA::slot_pollthread(void *c)
|
||||
printf("r = %d, %m\n", res);
|
||||
}
|
||||
}
|
||||
/* no comment :) */
|
||||
#if tricky
|
||||
if ((!checkQueueSize(slot) && !slot->hasCAManager && !slot->ccmgr_ready) || slot->counter < 3)
|
||||
slot->pollConnection = true;
|
||||
if (slot->hasCAManager && slot->ccmgr_ready)
|
||||
slot->counter++;
|
||||
#else
|
||||
/* check for activate the pollConnection */
|
||||
if (!checkQueueSize(slot) && (slot->DataRCV || slot->mmiOpened || slot->counter > 5))
|
||||
{
|
||||
@@ -1012,7 +1003,6 @@ void cCA::slot_pollthread(void *c)
|
||||
slot->counter++;
|
||||
else
|
||||
slot->counter = 0;
|
||||
#endif
|
||||
/* if Flag: send a DataLast */
|
||||
if (!checkQueueSize(slot) && slot->pollConnection && slot->DataLast)
|
||||
{
|
||||
@@ -1147,11 +1137,7 @@ void cCA::slot_pollthread(void *c)
|
||||
/* not necessary: the arrived capmt will be automaticly send */
|
||||
//SendCaPMT(slot);
|
||||
}
|
||||
if (slot->hasCAManager && slot->hasAppManager && slot->newCapmt
|
||||
#if tricky
|
||||
&& slot->ccmgr_ready
|
||||
#endif
|
||||
)
|
||||
if (slot->hasCAManager && slot->hasAppManager && slot->newCapmt)
|
||||
{
|
||||
SendCaPMT(slot);
|
||||
slot->newCapmt = false;
|
||||
|
@@ -11,60 +11,30 @@
|
||||
|
||||
static const char * FILENAME = "[descrambler]";
|
||||
|
||||
/* alles im Kernel Header ca.h definiert da es der player2 auch braucht
|
||||
|
||||
enum ca_descr_data_type {
|
||||
CA_DATA_IV,
|
||||
CA_DATA_KEY,
|
||||
};
|
||||
|
||||
enum ca_descr_parity {
|
||||
CA_PARITY_EVEN,
|
||||
CA_PARITY_ODD,
|
||||
};
|
||||
|
||||
struct ca_descr_data {
|
||||
unsigned int index;
|
||||
enum ca_descr_parity parity;
|
||||
enum ca_descr_data_type data_type;
|
||||
unsigned int length;
|
||||
unsigned char *data;
|
||||
};
|
||||
#define CA_SET_DESCR_DATA _IOW('o', 137, struct ca_descr_data)
|
||||
|
||||
*/
|
||||
|
||||
static int desc_fd;
|
||||
|
||||
/* Byte 0 to 15 are AES Key, Byte 16 to 31 are IV */
|
||||
|
||||
int descrambler_set_key(int index, int parity, unsigned char *data)
|
||||
{
|
||||
struct ca_descr_data d;
|
||||
|
||||
printf("%s -> %s\n", FILENAME, __FUNCTION__);
|
||||
|
||||
|
||||
d.index = index;
|
||||
d.parity = (ca_descr_parity)parity;
|
||||
d.data_type = CA_DATA_KEY;
|
||||
d.length = 16;
|
||||
d.length = 32;
|
||||
d.data = data;
|
||||
|
||||
printf("Index: %d Parity: %d Type CA_DATA_KEY= %d\n", d.index, d.parity, d.data_type);
|
||||
hexdump(d.data, 16);
|
||||
printf("Index: %d Parity: (%d) -> ", d.index, d.parity);
|
||||
hexdump(d.data, 32);
|
||||
|
||||
if (ioctl(desc_fd, CA_SET_DESCR_DATA, &d))
|
||||
printf("CA_SET_DESCR_DATA\n");
|
||||
|
||||
d.index = index;
|
||||
d.parity = (ca_descr_parity)parity;
|
||||
d.data_type = CA_DATA_IV;
|
||||
d.length = 16;
|
||||
d.data = data + 16;
|
||||
|
||||
printf("Index: %d Parity: %d Type CA_DATA_IV= %d\n", d.index, d.parity, d.data_type);
|
||||
hexdump(d.data, 16);
|
||||
|
||||
if (ioctl(desc_fd, CA_SET_DESCR_DATA, &d))
|
||||
printf("CA_SET_DESCR_DATA\n");
|
||||
|
||||
{
|
||||
//printf("CA_SET_DESCR_DATA\n");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user