Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
linuxdvb diseqc: reset cache values when frontend is closed, fixes #2547
  • Loading branch information
perexg committed Dec 14, 2014
1 parent 70a17df commit 811eeb4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/input/mpegts/linuxdvb/linuxdvb_frontend.c
Expand Up @@ -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);

Expand Down Expand Up @@ -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 */
Expand Down
3 changes: 3 additions & 0 deletions src/input/mpegts/linuxdvb/linuxdvb_private.h
Expand Up @@ -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__ */
12 changes: 12 additions & 0 deletions src/input/mpegts/linuxdvb/linuxdvb_satconf.c
Expand Up @@ -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
* *************************************************************************/
Expand Down

0 comments on commit 811eeb4

Please sign in to comment.