]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
cclient: fix cc_remove_card() - wrong {}, fixes #4954
authorJaroslav Kysela <perex@perex.cz>
Tue, 20 Mar 2018 17:27:42 +0000 (18:27 +0100)
committerJaroslav Kysela <perex@perex.cz>
Tue, 20 Mar 2018 17:27:42 +0000 (18:27 +0100)
src/descrambler/cclient.c
src/input/mpegts/mpegts_input.c

index bf533301a20b6bb4742683b72c53ecce67804e1a..8b73a0409d673eec9728bfc7bb2f05658838bcbc 100644 (file)
@@ -229,14 +229,14 @@ cc_remove_card(cclient_t *cc, cc_card_data_t *pcard)
           cc_get_card_name(pcard, buf, sizeof(buf)));
 
   /* invalidate all requests */
-  LIST_FOREACH(ct, &cc->cc_services, cs_link) {
+  LIST_FOREACH(ct, &cc->cc_services, cs_link)
     for (ep = LIST_FIRST(&ct->cs_ecm_pids); ep; ep = epn) {
       epn = LIST_NEXT(ep, ep_link);
       for (es = LIST_FIRST(&ep->ep_sections); es; es = esn) {
         esn = LIST_NEXT(es, es_link);
         if (es->es_caid == pcard->cs_ra.caid) {
           emmp = pcard->cs_ra.providers;
-          for (i = 0; i < pcard->cs_ra.providers_count; i++, emmp++)
+          for (i = 0; i < pcard->cs_ra.providers_count; i++, emmp++) {
             if (emmp->id == es->es_provid) {
               cc_free_ecm_section(es);
               break;
index 8e70bc9d51912b865e27fc69309bd262bc93ae3f..3d368a78cced4ff48fbf13e83458c6f7ed2be53f 100644 (file)
@@ -1668,7 +1668,9 @@ mpegts_input_thread ( void * p )
   int update_pids;
   char buf[256];
 
+  pthread_mutex_lock(&global_lock);
   mi->mi_display_name(mi, buf, sizeof(buf));
+  pthread_mutex_unlock(&global_lock);
   pthread_mutex_lock(&mi->mi_input_lock);
   while (atomic_get(&mi->mi_running)) {