]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
cwc: reset prefcapid if service can't be descrambled(cherry picked from commit 667e1c...
authorxhaggi <sascha.woo@gmail.com>
Thu, 21 Feb 2013 00:12:43 +0000 (01:12 +0100)
committerAdam Sutton <dev@adamsutton.me.uk>
Thu, 21 Feb 2013 16:00:01 +0000 (16:00 +0000)
src/cwc.c

index 5de7b8399af405c8c33e05f3f2cce13785af740e..6a0538ade6c5977e4bc0911ebfc92f5f3c5bbd32 100644 (file)
--- a/src/cwc.c
+++ b/src/cwc.c
@@ -835,12 +835,17 @@ forbid:
           "Req delay: %"PRId64" ms)",
           t->s_svcname, seq, delay);
     ct->cs_keystate = CS_FORBIDDEN;
+
+    /* reset prefcapid if descrambling fails */
+    t->s_prefcapid = 0;
+    service_request_save(t, 0);
+
     return;
 
   } else {
 
     ct->cs_okchannel = es->es_channel;
-    tvhlog(LOG_DEBUG, "cwc",  "es->es_nok %d      t->tht_prefcapid %d", es->es_nok, t->s_prefcapid);
+    tvhlog(LOG_DEBUG, "cwc", "es->es_nok %d, t->tht_prefcapid %d", es->es_nok, t->s_prefcapid);
     if(es->es_nok == 1 || t->s_prefcapid == 0) {
       t->s_prefcapid = ct->cs_okchannel;
       service_request_save(t, 0);