]> www.vanbest.org Git - sasc-ng.git/commitdiff
backport fixes from trunk
authorleslie <unknown>
Wed, 19 Aug 2009 22:11:27 +0000 (06:11 +0800)
committerleslie <unknown>
Wed, 19 Aug 2009 22:11:27 +0000 (06:11 +0800)
cam.c
systems/cardclient/cc.c

diff --git a/cam.c b/cam.c
index 3cc79fb8c40be4598c8a9584b4a2f03595937cbb..d5ca3a7584fc9c65def28507801846101309d7d4 100644 (file)
--- a/cam.c
+++ b/cam.c
@@ -1275,6 +1275,7 @@ void cEcmHandler::ParseCAInfo(int SysId)
             cEcmInfo *n;
             while((n=ecms.First())) {
               ecms.Del(n,false);
+              n->SetSource(sid,filterSource,filterTransponder);
               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);
@@ -1298,7 +1299,6 @@ void cEcmHandler::ParseCAInfo(int SysId)
                 }
               if(n) {
                 if(dolog) LBPUT("(new)");
-                n->SetSource(sid,filterSource,filterTransponder);
                 ecmList.Add(n);
                 AddEcmPri(n);
                 }
index 1f73c96603651737f103cd8904803cc90953e78b..655fab6929392a804ce70d1f3f79a2f55ab88cf5 100644 (file)
@@ -195,7 +195,7 @@ cSystemCardClient::cSystemCardClient(void)
 
 bool cSystemCardClient::ProcessECM(const cEcmInfo *ecm, unsigned char *data)
 {
-  cCardClient *startCc=cc;
+  cCardClient *startCc=cc, *oldcc;
   do {
     if(cc) {
       cTimeMs start;
@@ -220,9 +220,10 @@ bool cSystemCardClient::ProcessECM(const cEcmInfo *ecm, unsigned char *data)
         }
       }
     if(!cc) PRINTF(L_CC_CORE,"cc-loop");
+    oldcc=cc;
     cc=staticCcl.FindBySysId(ecm->caId,cc);
     if(cc && cc!=startCc) PRINTF(L_CC_CORE,"now trying client %s (%s:%d)",cc->Name(),cc->hostname,cc->port);
-    } while(cc!=startCc);
+    } while(cc!=startCc && cc!=oldcc);
   return false;
 }