From 1c5aec0d7c11bf49e48337b31a54c346822b0037 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Sat, 15 Mar 2014 22:27:56 +0100 Subject: [PATCH] Another fix for the dvb adapter settings save --- src/input/mpegts/linuxdvb/linuxdvb_adapter.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/input/mpegts/linuxdvb/linuxdvb_adapter.c b/src/input/mpegts/linuxdvb/linuxdvb_adapter.c index f15b41e2..9e8ed91b 100644 --- a/src/input/mpegts/linuxdvb/linuxdvb_adapter.c +++ b/src/input/mpegts/linuxdvb/linuxdvb_adapter.c @@ -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); }