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).
This commit is contained in:
Jaroslav Kysela 2014-03-15 21:03:34 +01:00
parent 3f3fdc8af1
commit 1fab83c6f3

View 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 */