]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
linuxdvb diseqc: reset cache values when frontend is closed, fixes #2547
authorJaroslav Kysela <perex@perex.cz>
Sun, 14 Dec 2014 12:32:25 +0000 (13:32 +0100)
committerJaroslav Kysela <perex@perex.cz>
Sun, 14 Dec 2014 12:32:25 +0000 (13:32 +0100)
src/input/mpegts/linuxdvb/linuxdvb_frontend.c
src/input/mpegts/linuxdvb/linuxdvb_private.h
src/input/mpegts/linuxdvb/linuxdvb_satconf.c

index c3ed43f26a6e90f2046ab5a6397d4024378f993b..1d7a433f50ad6d9f5ab92faf471deb339fe370a5 100644 (file)
@@ -209,6 +209,8 @@ linuxdvb_frontend_enabled_updated ( mpegts_input_t *mi )
     if (lfe->lfe_fe_fd > 0) {
       close(lfe->lfe_fe_fd);
       lfe->lfe_fe_fd = -1;
+      if (lfe->lfe_satconf)
+        linuxdvb_satconf_reset(lfe->lfe_satconf);
     }
     gtimer_disarm(&lfe->lfe_monitor_timer);
 
@@ -483,6 +485,8 @@ linuxdvb_frontend_monitor ( void *aux )
     tvhtrace("linuxdvb", "%s - closing frontend", buf);
     close(lfe->lfe_fe_fd);
     lfe->lfe_fe_fd = -1;
+    if (lfe->lfe_satconf)
+      linuxdvb_satconf_reset(lfe->lfe_satconf);
   }
 
   /* Check accessibility */
index 292f0993d1ae45054ac005e0751c43abcda2a6af..acb3b4358a0e70b7f9ed8e9532af6c33f9531e77 100644 (file)
@@ -335,4 +335,7 @@ void linuxdvb_satconf_post_stop_mux( linuxdvb_satconf_t *ls );
 int linuxdvb_satconf_start_mux
   ( linuxdvb_satconf_t *ls, mpegts_mux_instance_t *mmi );
 
+void linuxdvb_satconf_reset
+  ( linuxdvb_satconf_t *ls );
+
 #endif /* __TVH_LINUXDVB_PRIVATE_H__ */
index 86552a3f320ca81cbf343fe393890496a5cd3ebc..38cb8704cb3878aa3e07407c89695e2f8d3601df 100644 (file)
@@ -776,6 +776,18 @@ linuxdvb_satconf_start_mux
   return linuxdvb_satconf_ele_tune(lse);
 }
 
+/*
+ *
+ */
+void
+linuxdvb_satconf_reset
+  ( linuxdvb_satconf_t *ls )
+{
+  ls->ls_last_switch = NULL;
+  ls->ls_last_pol = 0;
+  ls->ls_last_toneburst = 0;
+}
+
 /* **************************************************************************
  * Create/Delete satconf
  * *************************************************************************/