aboutsummaryrefslogtreecommitdiffstats
path: root/funcs/func_odbc.c
diff options
context:
space:
mode:
Diffstat (limited to 'funcs/func_odbc.c')
-rw-r--r--funcs/func_odbc.c4
1 files changed, 2 insertions, 2 deletions
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);