Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
profile: use pass as default profile when config files are corrupted
  • Loading branch information
perexg committed Dec 5, 2014
1 parent 2d7cda7 commit da2ae27
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/profile.c
Expand Up @@ -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;

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit da2ae27

Please sign in to comment.