profile: use pass as default profile when config files are corrupted
This commit is contained in:
parent
2d7cda7eef
commit
da2ae270f5
1 changed files with 8 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue