]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Do not save the adapter settings on each probe (start)
authorJaroslav Kysela <perex@perex.cz>
Sat, 15 Mar 2014 20:03:34 +0000 (21:03 +0100)
committerJaroslav Kysela <perex@perex.cz>
Sat, 15 Mar 2014 20:05:49 +0000 (21:05 +0100)
The 'conf = feconf = NULL' line should be at another place otherwise
the last condition is always true (and the configuration is always saved).

src/input/mpegts/linuxdvb/linuxdvb_adapter.c

index 406095a5047381e340eda2245ae677855c691e6c..f15b41e2edb99f75824804273f037227a384846a 100644 (file)
@@ -168,7 +168,7 @@ linuxdvb_adapter_add ( const char *path )
   struct dvb_frontend_info dfi;
   SHA_CTX sha1;
   uint8_t uuidbin[20];
-  htsmsg_t *conf = NULL, *feconf = NULL;
+  htsmsg_t *conf, *feconf;
 #if DVB_VER_ATLEAST(5,10)
   int fetypes[4] = { 0 };
   struct dtv_property   cmd = {
@@ -194,6 +194,8 @@ linuxdvb_adapter_add ( const char *path )
 
   /* Process each frontend */
   for (i = 0; i < 32; i++) {
+    conf = feconf = NULL;
+
     snprintf(fe_path, sizeof(fe_path), FE_PATH, path, i);
 
     /* Wait for access (first FE can take a fe ms to be setup) */
@@ -298,7 +300,6 @@ linuxdvb_adapter_add ( const char *path )
 #endif
     pthread_mutex_unlock(&global_lock);
     htsmsg_destroy(conf);
-    conf = feconf = NULL;
   }
 
   /* Relock before exit */