cwc: return back the key composition - seems like some CA cards returns only single key
This commit is contained in:
parent
7f5dff6405
commit
da05976c32
1 changed files with 9 additions and 1 deletions
|
@ -143,6 +143,8 @@ typedef struct cwc_service {
|
|||
ECM_RESET
|
||||
} ecm_state;
|
||||
|
||||
uint8_t cs_even[8];
|
||||
uint8_t cs_odd[8];
|
||||
tvhcsa_t cs_csa;
|
||||
|
||||
LIST_HEAD(, ecm_pid) cs_pids;
|
||||
|
@ -693,6 +695,7 @@ handle_ecm_reply(cwc_service_t *ct, ecm_section_t *es, uint8_t *msg,
|
|||
int i;
|
||||
int64_t delay = (getmonoclock() - es->es_time) / 1000LL; // in ms
|
||||
es->es_pending = 0;
|
||||
static uint8_t empty[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
|
||||
snprintf(chaninfo, sizeof(chaninfo), " (PID %d)", es->es_channel);
|
||||
|
||||
|
@ -777,7 +780,12 @@ forbid:
|
|||
"Obtained key for service \"%s\" in %"PRId64" ms, from %s",
|
||||
t->s_dvb_svcname, delay, ct->td_nicename);
|
||||
|
||||
descrambler_keys((th_descrambler_t *)ct, msg + 3, msg + 3 + 8);
|
||||
if (memcmp(msg + 3, empty, 8))
|
||||
memcpy(ct->cs_even, msg + 3, 8);
|
||||
if (memcmp(msg + 3 + 8, empty, 8))
|
||||
memcpy(ct->cs_odd, msg + 3 + 8, 8);
|
||||
|
||||
descrambler_keys((th_descrambler_t *)ct, ct->cs_even, ct->cs_odd);
|
||||
|
||||
ep = LIST_FIRST(&ct->cs_pids);
|
||||
while(ep != NULL) {
|
||||
|
|
Loading…
Add table
Reference in a new issue