diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-12-14 17:36:08 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-12-14 17:36:08 +0000 |
commit | f5f21806cd5684b9efbe562a86575bb9a314f527 (patch) | |
tree | 00adf2c1e8975e2c94e92a54c9916137e525ecb1 /main/config.c | |
parent | 3fb10d190024d007a4f2850c5996b29ada64ce26 (diff) |
There are a lot of existing systems that #include non-existent files. So, to
make the transition to treating this as an error a bit less painless, just issue
a huge error message for now. Then, later, we can reinstate the code that treats
it as a failure.
(Thanks to philippel for the feedback)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@93000 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/config.c')
-rw-r--r-- | main/config.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/main/config.c b/main/config.c index db347d65b..7e0bd57d7 100644 --- a/main/config.c +++ b/main/config.c @@ -744,8 +744,17 @@ static int process_text_line(struct ast_config *cfg, struct ast_category **cat, do_include = ast_config_internal_load(cur, cfg, withcomments) ? 1 : 0; if(!ast_strlen_zero(exec_file)) unlink(exec_file); - if(!do_include) - return -1; + if (!do_include) { + ast_log(LOG_ERROR, "*********************************************************\n"); + ast_log(LOG_ERROR, "*********** YOU SHOULD REALLY READ THIS ERROR ***********\n"); + ast_log(LOG_ERROR, "Future versions of Asterisk will treat a #include of a " + "file that does not exist as an error, and will fail to " + "load that configuration file. Please ensure that the " + "file '%s' exists, even if it is empty.\n", cur); + ast_log(LOG_ERROR, "*********** YOU SHOULD REALLY READ THIS ERROR ***********\n"); + ast_log(LOG_ERROR, "*********************************************************\n"); + return 0; + } } else { ast_log(LOG_WARNING, "Directive '#%s' needs an argument (%s) at line %d of %s\n", |