diff -Nru sc-hg-20120721/cam.c sc-hg-20120721-ignore_caid/cam.c --- sc-hg-20120721/cam.c 2012-07-22 17:25:10.000000000 +0000 +++ sc-hg-20120721-ignore_caid/cam.c 2012-07-22 17:40:38.000000000 +0000 @@ -317,7 +317,7 @@ } else { LBPUT(" ->"); - if(!overrides.Ignore(source,transponder,caid)) { + if(!overrides.Ignore(source,transponder,caid,0)) { int Pri=0; while((sys=cSystems::FindBySysId(caid,!softCSA,Pri))) { Pri=sys->Pri(); @@ -1371,7 +1371,7 @@ { int ident, pri=0; while(1) { - if(overrides.Ignore(n->source,n->transponder,n->caId)) break; + if(overrides.Ignore(n->source,n->transponder,n->caId,n->provId)) break; if(!n->Cached()) ident=cSystems::FindIdentBySysId(n->caId,!cam->IsSoftCSA(filterCwIndex==0),pri); else ident=(pri==0) ? cSystems::FindIdentBySysName(n->caId,!cam->IsSoftCSA(filterCwIndex==0),n->name,pri) : 0; if(ident<=0) break; @@ -1496,10 +1496,6 @@ int sysId=WORD(buff,index+2,0xFFFF); if(SysId!=0xFFFF && sysId!=SysId) continue; if(dolog) LDUMP(L_CORE_ECM,&buff[index+2],buff[index+1],"%s: descriptor",id); - if(overrides.Ignore(filterSource,filterTransponder,sysId)) { - if(dolog) PRINTF(L_CORE_ECM,"%s: system %04x ignored",id,sysId); - continue; - } int sysPri=0; cSystem *sys; while((sys=cSystems::FindBySysId(sysId,!cam->IsSoftCSA(filterCwIndex==0),sysPri))) { @@ -1514,6 +1510,10 @@ n->SetSource(filterSid,filterSource,filterTransponder); n->SetDvb(cam->Adapter(),cam->Frontend()); n->AddCaDescr(&buff[index],buff[index+1]+2); + if(overrides.Ignore(filterSource,filterTransponder,n->caId,n->provId)) { + if(dolog) PRINTF(L_CORE_ECM,"%s: system %04x - id %04x ignored",id,n->caId,n->provId); + continue; + } overrides.UpdateEcm(n,dolog); LBSTARTF(L_CORE_ECM); if(dolog) LBPUT("%s: found %04x(%04x) (%s) id %04x with ecm %x/%x ",id,n->caId,n->emmCaId,n->name,n->provId,n->ecm_pid,n->ecm_table); @@ -1669,7 +1669,7 @@ const caid_t *ids=ch->Caids(); while(*ids) { int pri=0; - if(overrides.Ignore(ch->Source(),ch->Transponder(),*ids)) + if(overrides.Ignore(ch->Source(),ch->Transponder(),*ids,0)) ch->Del(*ids); else { char c=cache[*ids]; diff -Nru sc-hg-20120721/override.c sc-hg-20120721-ignore_caid/override.c --- sc-hg-20120721/override.c 2012-07-22 17:25:10.000000000 +0000 +++ sc-hg-20120721-ignore_caid/override.c 2012-07-22 17:40:38.000000000 +0000 @@ -452,11 +452,12 @@ class cOverrideIgnore : public cOverride { private: - int num, caid[OV_MAXIGNORES]; + int num, caid[OV_MAXIGNORES], prov[OV_MAXIGNORES]; + bool UsesProvId(int caid); public: cOverrideIgnore(void) { type=OV_IGNORE; } virtual bool Parse(char *str); - bool Ignore(int Caid); + bool Ignore(int Caid, int Prov); }; bool cOverrideIgnore::Parse(char *str) @@ -465,26 +466,40 @@ num=0; int n=-1; do { + prov[num]=-1; int l=n+1; - if(sscanf(&str[l],"%x%n",&caid[num],&n)!=1) { + if(sscanf(&str[l],"%x%n/%x%n",&caid[num],&n,&prov[num],&n)<1) { PRINTF(L_CORE_LOAD,"override: IGNORE format error"); return false; } + if(prov[num]>=0 && !UsesProvId(caid[num])) { + PRINTF(L_CORE_LOAD,"override: IGNORE provider ID not supported for caid %04x",caid[num]); + return false; + } n+=l; num++; } while(num=0 ? " %04x/%x":" %04x",caid[i],prov[i]); LBEND(); return true; } return false; } -bool cOverrideIgnore::Ignore(int Caid) +bool cOverrideIgnore::UsesProvId(int caid) +{ + switch(caid>>8) { + case 0x01: + case 0x05: return true; + } + return false; +} + +bool cOverrideIgnore::Ignore(int Caid, int Prov) { for(int i=0; i(ov); - if(ovi && ovi->Ignore(caid)) res=true; + if(ovi && ovi->Ignore(caid,prov)) res=true; } ListUnlock(); return res; diff -Nru sc-hg-20120721/override.h sc-hg-20120721-ignore_caid/override.h --- sc-hg-20120721/override.h 2012-07-22 17:25:10.000000000 +0000 +++ sc-hg-20120721-ignore_caid/override.h 2012-07-22 17:40:38.000000000 +0000 @@ -95,7 +95,7 @@ int GetCat(int source, int transponder, unsigned char *buff, int len); void UpdateEcm(cEcmInfo *ecm, bool log); bool AddEmmPids(int caid, int source, int transponder, cPids *pids, int pid); - bool Ignore(int source, int transponder, int caid); + bool Ignore(int source, int transponder, int caid, int prov); int GetEcmPrio(int source, int transponder, int caid, int prov); };