From: Jaroslav Kysela Date: Fri, 5 Dec 2014 18:41:10 +0000 (+0100) Subject: profile: use pass as default profile when config files are corrupted X-Git-Tag: v4.1~644 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da2ae270f503c84734604220d266b10129ec5df5;p=thirdparty%2Ftvheadend.git profile: use pass as default profile when config files are corrupted --- diff --git a/src/profile.c b/src/profile.c index e844a9a54..4795b244e 100644 --- a/src/profile.c +++ b/src/profile.c @@ -1443,7 +1443,7 @@ profile_init(void) } name = "pass"; - pro = profile_find_by_name2(name, NULL,1 ); + pro = profile_find_by_name2(name, NULL, 1); if (pro == NULL || strcmp(pro->pro_name, name)) { htsmsg_t *conf; @@ -1550,6 +1550,13 @@ profile_init(void) htsmsg_destroy(conf); } #endif + + /* Assign the default profile if config files are corrupted */ + if (!profile_default) { + pro = profile_find_by_name2("pass", NULL, 1); + assert(pro); + profile_default = pro; + } } void