diff options
author | Steve Murphy <murf@digium.com> | 2006-09-22 21:17:07 +0000 |
---|---|---|
committer | Steve Murphy <murf@digium.com> | 2006-09-22 21:17:07 +0000 |
commit | 13ceee6333f002e1932886a0d5ca790966553318 (patch) | |
tree | e9bb066b93b709553cf51c25001231fe42a6ea9d | |
parent | 23db39367cabb4d7f71bc5ccc0edbf67d69173fe (diff) |
As per bug 8004, we now return AST_MODULE_LOAD_DECLINE when we can't read extensions.ael
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43506 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | pbx/pbx_ael.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pbx/pbx_ael.c b/pbx/pbx_ael.c index 791a58c3c..f460b630f 100644 --- a/pbx/pbx_ael.c +++ b/pbx/pbx_ael.c @@ -28,6 +28,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include <sys/types.h> #include <stdlib.h> +#include <unistd.h> #include <stdio.h> #include <string.h> #include <ctype.h> @@ -3803,6 +3804,11 @@ static int pbx_load_module(void) sprintf(rfilename, "%s/%s", ast_config_AST_CONFIG_DIR, config); } ast_log(LOG_NOTICE, "AEL load process: calculated config file name '%s'.\n", rfilename); + + if (access(rfilename,R_OK) != 0) { + ast_log(LOG_NOTICE, "File %s not found; AEL declining load\n", rfilename); + return AST_MODULE_LOAD_DECLINE; + } parse_tree = ael2_parse(rfilename, &errs); ast_log(LOG_NOTICE, "AEL load process: parsed config file name '%s'.\n", rfilename); |