mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
Fix checking for CONFIG_STATUS_FILEINVALID so that modules don't crash upon trying to parse an invalid config
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@157818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1721,7 +1721,7 @@ int ast_xmldoc_load_documentation(void)
|
||||
/* setup default XML documentation language */
|
||||
snprintf(documentation_language, sizeof(documentation_language), default_documentation_language);
|
||||
|
||||
if ((cfg = ast_config_load2("asterisk.conf", "" /* core can't reload */, cnfflags))) {
|
||||
if ((cfg = ast_config_load2("asterisk.conf", "" /* core can't reload */, cnfflags)) && cfg != CONFIG_STATUS_FILEINVALID) {
|
||||
for (var = ast_variable_browse(cfg, "options"); var; var = var->next) {
|
||||
if (!strcasecmp(var->name, "documentation_language")) {
|
||||
if (!ast_strlen_zero(var->value)) {
|
||||
|
Reference in New Issue
Block a user