changeset 27863:f3384addfb0b

set to -1 fds that were closed; handle the sec_fd only if CONFIG_DVB_HEAD isn't defined; patch by Reimar
author nicodvb
date Wed, 05 Nov 2008 23:37:52 +0000
parents 797c74f9213c
children ab92ea15c414
files stream/dvb_tune.c stream/stream_dvb.c
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/stream/dvb_tune.c	Tue Nov 04 21:00:29 2008 +0000
+++ b/stream/dvb_tune.c	Wed Nov 05 23:37:52 2008 +0000
@@ -117,9 +117,7 @@
 		mp_msg(MSGT_DEMUX, MSGL_ERR, "ERROR OPENING FRONTEND DEVICE %s: ERRNO %d\n", frontend_dev, errno);
 		return 0;
 	}
-#ifdef CONFIG_DVB_HEAD
-	priv->sec_fd=-1;
-#else
+#ifndef CONFIG_DVB_HEAD
 	priv->sec_fd = open(sec_dev, O_RDWR);
 	if(priv->sec_fd < 0)
 	{
--- a/stream/stream_dvb.c	Tue Nov 04 21:00:29 2008 +0000
+++ b/stream/stream_dvb.c	Wed Nov 05 23:37:52 2008 +0000
@@ -614,6 +614,7 @@
 #ifndef CONFIG_DVB_HEAD
 	close(priv->sec_fd);
 #endif
+	priv->fe_fd = priv->sec_fd = priv->dvr_fd = -1;
 
 	priv->is_on = 0;
 	dvb_free_config(priv->config);
@@ -685,6 +686,7 @@
 		return STREAM_ERROR;
 
 	priv = (dvb_priv_t *)stream->priv;
+	priv->fe_fd = priv->sec_fd = priv->dvr_fd = -1;
 	priv->config = dvb_get_config();
 	if(priv->config == NULL)
 	{