summaryrefslogtreecommitdiff
path: root/funcs
diff options
context:
space:
mode:
Diffstat (limited to 'funcs')
-rw-r--r--funcs/func_config.c4
-rw-r--r--funcs/func_odbc.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/funcs/func_config.c b/funcs/func_config.c
index 6bed8a9b2..5669f3655 100644
--- a/funcs/func_config.c
+++ b/funcs/func_config.c
@@ -82,7 +82,7 @@ static int config_function_read(struct ast_channel *chan, const char *cmd, char
return -1;
}
- if (!(cfg = ast_config_load(args.filename, cfg_flags))) {
+ if (!(cfg = ast_config_load(args.filename, cfg_flags)) || cfg == CONFIG_STATUS_FILEINVALID) {
return -1;
}
@@ -107,7 +107,7 @@ static int config_function_read(struct ast_channel *chan, const char *cmd, char
strcpy(cur->filename, args.filename);
ast_clear_flag(&cfg_flags, CONFIG_FLAG_FILEUNCHANGED);
- if (!(cfg = ast_config_load(args.filename, cfg_flags))) {
+ if (!(cfg = ast_config_load(args.filename, cfg_flags)) || cfg == CONFIG_STATUS_FILEINVALID) {
ast_free(cur);
AST_RWLIST_UNLOCK(&configs);
return -1;
diff --git a/funcs/func_odbc.c b/funcs/func_odbc.c
index b6a17ffa2..24034bb0d 100644
--- a/funcs/func_odbc.c
+++ b/funcs/func_odbc.c
@@ -812,7 +812,7 @@ static int load_module(void)
AST_RWLIST_WRLOCK(&queries);
cfg = ast_config_load(config, config_flags);
- if (!cfg) {
+ if (!cfg || cfg == CONFIG_STATUS_FILEINVALID) {
ast_log(LOG_NOTICE, "Unable to load config for func_odbc: %s\n", config);
AST_RWLIST_UNLOCK(&queries);
return AST_MODULE_LOAD_DECLINE;
@@ -878,7 +878,7 @@ static int reload(void)
struct ast_flags config_flags = { CONFIG_FLAG_FILEUNCHANGED };
cfg = ast_config_load(config, config_flags);
- if (cfg == CONFIG_STATUS_FILEUNCHANGED)
+ if (cfg == CONFIG_STATUS_FILEUNCHANGED || cfg == CONFIG_STATUS_FILEINVALID)
return 0;
AST_RWLIST_WRLOCK(&queries);