- Timestamp:
- 03/06/10 20:53:45 (14 years ago)
- Location:
- branches/modular
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/modular/module-dvbapi.c
r1796 r1802 380 380 dvbapi_stop_filter(demux_id, 1); 381 381 382 memset(demux[demux_id].buffer_cache_dmx, 0, CS_ECMSTORESIZE); 383 382 384 if (demux[demux_id].ca_fd>0) { 383 for (i=0;i<demux[demux_id].STREAMpidcount;i++) 384 { 385 for (i=0;i<demux[demux_id].STREAMpidcount;i++) { 385 386 ca_pid_t ca_pid2; 386 387 memset(&ca_pid2,0,sizeof(ca_pid2)); … … 483 484 484 485 void dvbapi_resort_ecmpids(int demux_index) { 485 ECMPIDSTYPE tmppids[ECM_PIDS]; 486 ECMPIDSTYPE tmppids2[ECM_PIDS]; 487 488 int tmppidcount=0,tmppid2count=0,n; 489 490 int i,k,j; 486 ECMPIDSTYPE tmppids[ECM_PIDS],tmppids2[ECM_PIDS]; 487 int tmppidcount=0,tmppid2count=0,n,i,k,j; 491 488 492 489 for (i=0;i<MAX_CAID;i++) … … 594 591 } else { 595 592 //neutrino workaround 596 dvbapi_stop_descrambling_all(0);593 //dvbapi_stop_descrambling_all(0); 597 594 } 598 595 … … 611 608 return 0; 612 609 } 610 } 611 612 if (global_support_pip != 1 && global_merged_capmt != 1) { 613 dvbapi_stop_descrambling_all(0); 613 614 } 614 615 … … 813 814 int i,rc; 814 815 pthread_t p1; 815 char md5buf[CS_ECMSTORESIZE];816 unsigned char md5buf[CS_ECMSTORESIZE]; 816 817 817 818 if (cfg->dvbapi_usr[0]==0) { … … 833 834 demux[i].ca_fd=0; 834 835 demux[i].demux_index=-1; 835 memset(demux[i].buffer_cache_dmx, 0 ,12);836 memset(demux[i].buffer_cache_dmx, 0, CS_ECMSTORESIZE); 836 837 for (rc=0;rc<MAX_FILTER;rc++) demux[i].demux_fd[rc].fd=0; 837 838 } -
branches/modular/reader-cryptoworks.c
r1776 r1802 466 466 ep->type = UNKNOWN; 467 467 break; 468 468 469 case 0x84: 469 470 if(ep->emm[3]==0xA9 && ep->emm[4]==0xFF && ep->emm[12]==0x80 && ep->emm[13]==0x04) … … 472 473 ep->type = UNKNOWN; 473 474 break; 475 476 case 0x88: 474 477 case 0x89: 475 478 if(ep->emm[3]==0xA9 && ep->emm[4]==0xFF && ep->emm[8]==0x83 && ep->emm[9]==0x01) … … 478 481 ep->type = UNKNOWN; 479 482 break; 480 case 0x8F://incoming via camd3.5x 481 //ep->type=emm[4]; 483 484 case 0x86: 485 if(ep->emm[3]==0xA9 && ep->emm[4]==0xFF && ep->emm[5]==0x83 && ep->emm[6]==0x01) 486 ep->type = GLOBAL; 487 else 488 ep->type = UNKNOWN; 489 break; 490 491 case 0x8F://FIXME incoming emm via camd3.5x, SA/GA/UA ? 482 492 default: 483 493 ep->type = UNKNOWN; … … 506 516 507 517 //cs_log("[cryptoworks-reader] EMM Dump:..: %s",cs_hexdump(1, emm, emm[2])); 508 switch(ep->type) 509 { 510 // emm via camd3.5x 511 case 0x8F: 512 if(emm[3]==0xA4) 518 switch(ep->emm[0]) 519 { 520 case UNKNOWN: 521 // FIXME emm via camd3.5x was returned from check_emm_type as UNKNOWN 522 // so we should check here for this emmtype until we know the real mode 523 if(emm[3]==0xA4 && emm[0]==0x8F) 513 524 { 514 525 //cs_log("[cryptoworks-reader] EMM Dump: CMD: %s", cs_hexdump(1, emm+3, 5)); … … 520 531 521 532 //GA 522 case 0x88: 523 case 0x89: 524 if(emm[3]==0xA9 && emm[4]==0xFF && emm[8]==0x83 && emm[9]==0x01) 525 { 526 insEMM_GA[4]=ep->emm[2]-2; 527 //cs_log("[cryptoworks-reader] EMM Dump: CMD: %s", cs_hexdump(1, insEMM_GA, 5)); 528 //cs_log("[cryptoworks-reader] EMM Dump: DATA: %s",cs_hexdump(1, emm+5, insEMM_GA[4])); 529 //cs_log("[cryptoworks-reader] EMM Dump: IF: %02X == %02X",emm[7],(insEMM_GA[4]-3)); 530 531 if(emm[7]==insEMM_GA[4]-3) 532 { 533 write_cmd(insEMM_GA, emm+5); 534 rc=((cta_res[0]==0x90)&&(cta_res[1]==0x00)); 535 } 536 } 533 case GLOBAL: 534 insEMM_GA[4]=ep->emm[2]-2; 535 //cs_log("[cryptoworks-reader] EMM Dump: CMD: %s", cs_hexdump(1, insEMM_GA, 5)); 536 //cs_log("[cryptoworks-reader] EMM Dump: DATA: %s",cs_hexdump(1, emm+5, insEMM_GA[4])); 537 //cs_log("[cryptoworks-reader] EMM Dump: IF: %02X == %02X",emm[7],(insEMM_GA[4]-3)); 538 if(emm[7]==insEMM_GA[4]-3) 539 { 540 write_cmd(insEMM_GA, emm+5); 541 rc=((cta_res[0]==0x90)&&(cta_res[1]==0x00)); 542 } 537 543 break; 538 544 539 545 //SA 540 case 0x84: 541 if(emm[3]==0xA9 && emm[4]==0xFF && emm[12]==0x80 && emm[13]==0x04) 542 { 543 insEMM_SA[4]=ep->emm[2]-6; 544 //cs_log("[cryptoworks-reader] EMM Dump: CMD: %s", cs_hexdump(1, insEMM_SA, 5)); 545 //cs_log("[cryptoworks-reader] EMM Dump: DATA: %s",cs_hexdump(1, emm+9, insEMM_SA[4])); 546 //cs_log("[cryptoworks-reader] EMM Dump: IF: %02X == %02X",emm[11],(insEMM_SA[4]-3)); 547 548 if(emm[11]==insEMM_SA[4]-3) 549 { 550 write_cmd(insEMM_SA, emm+9); 551 rc=((cta_res[0]==0x90)&&(cta_res[1]==0x00)); 552 } 553 } 546 case SHARED: 547 insEMM_SA[4]=ep->emm[2]-6; 548 //cs_log("[cryptoworks-reader] EMM Dump: CMD: %s", cs_hexdump(1, insEMM_SA, 5)); 549 //cs_log("[cryptoworks-reader] EMM Dump: DATA: %s",cs_hexdump(1, emm+9, insEMM_SA[4])); 550 //cs_log("[cryptoworks-reader] EMM Dump: IF: %02X == %02X",emm[11],(insEMM_SA[4]-3)); 551 if(emm[11]==insEMM_SA[4]-3) 552 { 553 write_cmd(insEMM_SA, emm+9); 554 rc=((cta_res[0]==0x90)&&(cta_res[1]==0x00)); 555 } 554 556 break; 555 557 556 558 //UA 557 case 0x82: 558 if(emm[3]==0xA9 && emm[4]==0xFF && emm[13]==0x80 && emm[14]==0x05) 559 case UNIQUE: 560 insEMM_UA[4]=ep->emm[2]-7; 561 //cs_log("[cryptoworks-reader] EMM Dump: CMD: %s", cs_hexdump(1, insEMM_UA, 5)); 562 //cs_log("[cryptoworks-reader] EMM Dump: DATA: %s",cs_hexdump(1, emm+10, insEMM_UA[4])); 563 //cs_log("[cryptoworks-reader] EMM Dump: IF: %02X == %02X",emm[12],(insEMM_UA[4]-3)); 564 if(emm[12]==insEMM_UA[4]-3) 559 565 { 560 insEMM_UA[4]=ep->emm[2]-7; 561 //cs_log("[cryptoworks-reader] EMM Dump: CMD: %s", cs_hexdump(1, insEMM_UA, 5)); 562 //cs_log("[cryptoworks-reader] EMM Dump: DATA: %s",cs_hexdump(1, emm+10, insEMM_UA[4])); 563 //cs_log("[cryptoworks-reader] EMM Dump: IF: %02X == %02X",emm[12],(insEMM_UA[4]-3)); 564 565 if(emm[12]==insEMM_UA[4]-3) 566 { 567 //cryptoworks_send_pin(); //?? may be 568 write_cmd(insEMM_UA, emm+10); 569 rc=((cta_res[0]==0x90)&&(cta_res[1]==0x00)); 570 } 571 } 566 //cryptoworks_send_pin(); //?? may be 567 write_cmd(insEMM_UA, emm+10); 568 rc=((cta_res[0]==0x90)&&(cta_res[1]==0x00)); 569 } 572 570 break; 573 571 }
Note:
See TracChangeset
for help on using the changeset viewer.