From 1fab83c6f3c9813b7c631f2b7f5217aedfd20c5f Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Sat, 15 Mar 2014 21:03:34 +0100 Subject: [PATCH] Do not save the adapter settings on each probe (start) 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/input/mpegts/linuxdvb/linuxdvb_adapter.c b/src/input/mpegts/linuxdvb/linuxdvb_adapter.c index 406095a5..f15b41e2 100644 --- a/src/input/mpegts/linuxdvb/linuxdvb_adapter.c +++ b/src/input/mpegts/linuxdvb/linuxdvb_adapter.c @@ -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 */