From ce30e23d57d09dcc1bef9a192ea50100b17fd6ae Mon Sep 17 00:00:00 2001 From: leslie Date: Sat, 23 Jan 2010 11:47:25 +0100 Subject: [PATCH] cardclient-cccam2: optionally request emulations (wantemu) --- examples/cardclient.conf.example | 3 ++- systems/cardclient/cccam2.c | 12 ++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/examples/cardclient.conf.example b/examples/cardclient.conf.example index 2af65c7..1bc98d4 100644 --- a/examples/cardclient.conf.example +++ b/examples/cardclient.conf.example @@ -62,8 +62,9 @@ cccam:hostname:port:emm/caid/mask:socket # NODEID=<16 characters> - your static node ID. Defaults to random ID # VERSION= - version string. Defaults to '2.0.11' # BUILD= - build string. Defaults to '2892' +# WANTEMUS=<0/1> - requesting of emulations. Defaults to 0 (off) # -# parameter example: BUILD=3212,NODEID=123A567F901C34E6 +# parameter example: BUILD=3212,WANTEMUS=1,NODEID=123A567F901C34E6 # # NOTE: this is a real client. You don't need to have CCcam running on local # machine. diff --git a/systems/cardclient/cccam2.c b/systems/cardclient/cccam2.c index 3ec3484..078158b 100644 --- a/systems/cardclient/cccam2.c +++ b/systems/cardclient/cccam2.c @@ -418,7 +418,9 @@ int cShares::GetShares(const cEcmInfo *ecm, cShares *ss) Clear(); ss->Lock(false); for(cShare *s=ss->First(); s; s=ss->Next(s)) { - if(s->caid==ecm->caId && (!s->UsesProv() || s->HasProv(ecm->provId)) && !Find(s->shareid)) { + if(((s->caid==ecm->caId && (!s->UsesProv() || s->HasProv(ecm->provId))) || + (s->shareid<64 && s->caid==(ecm->caId&0xFF00))) && + !Find(s->shareid)) { cShare *n=new cShare(s); n->status=ecmshares.FindStatus(ecm,n->shareid); // keep the list sorted @@ -531,7 +533,7 @@ private: unsigned char nodeid[8]; int shareid; char username[21], password[64], versstr[32], buildstr[32]; - bool login, emmProcessing; + bool login, emmProcessing, wantEmus; cTimeMs lastsend; int pendingDCW, pendingEMM, keymaskpos; // @@ -731,6 +733,7 @@ bool cCardClientCCcam2::Init(const char *config) strn0cpy(versstr,"2.0.11",sizeof(versstr)); strn0cpy(buildstr,"2892",sizeof(buildstr)); for(unsigned int i=0; i