From 4965b39719fc7ebcc0532914f527f8e946cb8a28 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Fri, 14 Dec 2007 17:36:08 +0000 Subject: [PATCH] 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: https://origsvn.digium.com/svn/asterisk/branches/1.4@93000 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/config.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/main/config.c b/main/config.c index db347d65be..7e0bd57d78 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",