[asterisk-commits] russell: branch 1.4 r93000 - /branches/1.4/main/config.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Dec 14 11:36:08 CST 2007
Author: russell
Date: Fri Dec 14 11:36:08 2007
New Revision: 93000
URL: http://svn.digium.com/view/asterisk?view=rev&rev=93000
Log:
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)
Modified:
branches/1.4/main/config.c
Modified: branches/1.4/main/config.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/config.c?view=diff&rev=93000&r1=92999&r2=93000
==============================================================================
--- branches/1.4/main/config.c (original)
+++ branches/1.4/main/config.c Fri Dec 14 11:36:08 2007
@@ -744,8 +744,17 @@
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",
More information about the asterisk-commits
mailing list