]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
cwc: reset preferred CA PID when NOKs are received and PID is not locked
authorJaroslav Kysela <perex@perex.cz>
Fri, 31 Oct 2014 14:38:36 +0000 (15:38 +0100)
committerJaroslav Kysela <perex@perex.cz>
Fri, 31 Oct 2014 14:38:36 +0000 (15:38 +0100)
src/descrambler/cwc.c

index cf26c11a3ad40b7b323384138e86f4f9788e95fa..bac4aa448c38689b28d54053a983670f73df4fd5 100755 (executable)
@@ -768,6 +768,9 @@ forbid:
              t->s_dvb_svcname, seq, delay, ct->td_nicename);
       ct->td_keystate = DS_FORBIDDEN;
       ct->ecm_state = ECM_RESET;
+      /* this pid is not valid, force full scan */
+      if (t->s_dvb_prefcapid == ct->cs_channel && t->s_dvb_prefcapid_lock == 0)
+        t->s_dvb_prefcapid = 0;
     }
     return;
 
@@ -875,9 +878,8 @@ cwc_running_reply(cwc_t *cwc, uint8_t msgtype, uint8_t *msg, int len)
               }
             }
       tvhlog(LOG_WARNING, "cwc", "Got unexpected ECM reply (seqno: %d)", seq);
-      LIST_FOREACH(ct, &cwc->cwc_services, cs_link) {
+      LIST_FOREACH(ct, &cwc->cwc_services, cs_link)
         ct->ecm_state = ECM_RESET;
-      }
       break;
 
     case 0xD3: