Changeset 3423
- Timestamp:
- 10/09/10 10:18:26 (13 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/module-dvbapi.c
r3422 r3423 623 623 cs_log("cryptoworks shared emm (EMM-SB): %s" , cs_hexdump(1, buffer, len)); 624 624 if (!emm_global_len) return; 625 provid [4]=buffer[7];625 provid=buffer[7]; 626 626 627 627 // we keep the first 12 bytes of the 0x84 emm (EMM-SH) … … 668 668 669 669 memset(&epg, 0, sizeof(epg)); 670 epg.caid[0] = (uchar)(demux[demux_index].ECMpids[demux[demux_index].pidindex].CAID>>8); 671 epg.caid[1] = (uchar)(demux[demux_index].ECMpids[demux[demux_index].pidindex].CAID); 672 673 // This will only works on some emm as each emm set the provider id differently. 674 // at this point buffer contains the current emm, which can be for any of the provider we're supporting 675 // and each emm has a different structure depending on the CA system and store the provider ID at a different 676 // position. So extracting it like this will probably only work for 1 CA (viaccess, nds, conax, seca, ....). 677 // As we get the provider from the demux above, why are we doing this ? the provider ID for this emm should be the 678 // one from : ulong provider = demux[demux_index].ECMpids[demux[demux_index].pidindex].PROVID; 679 // and below, after defining it with (buffer[10] << 8) | buffer[11];, it's potentialy overwriten by : 680 // provid = (cfg->dvbapi_prioritytab.cmap[pid] << 8 | cfg->dvbapi_prioritytab.mask[pid]); 681 // but if we don't find it in there we endup with a provider id which can be completely wrong !!! 682 // So I think the line bellow should be : 683 // unsigned long provid = provider; 684 // 685 // unsigned long provid = (buffer[10] << 8) | buffer[11]; 686 687 if(!provid) { 688 int pid = dvbapi_check_array(cfg->dvbapi_prioritytab.caid, CS_MAXCAIDTAB, demux[demux_index].ECMpids[demux[demux_index].pidindex].CAID); 689 if (pid>=0) { 690 if (cfg->dvbapi_prioritytab.mask[pid]>0) 691 provid = ((cfg->dvbapi_prioritytab.cmap[pid] << 8 | cfg->dvbapi_prioritytab.mask[pid]))<<8; // provid is 3 byte .. not 2 so I added a <<8 692 } 693 } 694 695 epg.provid[1] = (uchar)(provid>>16); 696 epg.provid[2] = (uchar)(provid>>8); 697 epg.provid[3] = (uchar)(provid); 670 671 memcpy(&epg.caid, &demux[demux_index].ECMpids[demux[demux_index].pidindex].CAID, 2); 672 memcpy(&epg.provid, &provid, 4); 698 673 699 674 epg.l=len; -
trunk/reader-nagra.c
r3349 r3423 849 849 int nagra2_get_emm_type(EMM_PACKET *ep, struct s_reader * rdr) //returns TRUE if shared emm matches SA, unique emm matches serial, or global or unknown 850 850 { 851 switch (ep->emm[0]) { 851 unsigned long provid = (ep->emm[10] << 8) | ep->emm[11]; 852 853 memcpy(&ep->provid, &provid, 4); 854 855 switch (ep->emm[0]) { 852 856 case 0x83: 853 857 memset(ep->hexserial,0,8);
Note:
See TracChangeset
for help on using the changeset viewer.