]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Another fix for the dvb adapter settings save 349/head
authorJaroslav Kysela <perex@perex.cz>
Sat, 15 Mar 2014 21:27:56 +0000 (22:27 +0100)
committerJaroslav Kysela <perex@perex.cz>
Sat, 15 Mar 2014 21:29:24 +0000 (22:29 +0100)
src/input/mpegts/linuxdvb/linuxdvb_adapter.c

index f15b41e2edb99f75824804273f037227a384846a..9e8ed91bf3c0d3124901b7b71758134bcfbe55e2 100644 (file)
@@ -169,6 +169,7 @@ linuxdvb_adapter_add ( const char *path )
   SHA_CTX sha1;
   uint8_t uuidbin[20];
   htsmsg_t *conf, *feconf;
+  int save = 0;
 #if DVB_VER_ATLEAST(5,10)
   int fetypes[4] = { 0 };
   struct dtv_property   cmd = {
@@ -270,6 +271,8 @@ linuxdvb_adapter_add ( const char *path )
       conf = hts_settings_load("input/linuxdvb/adapters/%s", uuid);
       if (conf)
         feconf = htsmsg_get_map(conf, "frontends");
+      else
+        save = 1;
   
       /* Create */
       if (!(la = linuxdvb_adapter_create(uuid, conf, path, a, &dfi))) {
@@ -306,7 +309,7 @@ linuxdvb_adapter_add ( const char *path )
   pthread_mutex_lock(&global_lock);
 
   /* Save configuration */
-  if (!conf && la)
+  if (save && la)
     linuxdvb_adapter_save(la);
 }