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
This commit is contained in:
Steve Murphy
2006-09-22 21:17:07 +00:00
parent 23db39367c
commit 13ceee6333

View File

@@ -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>
@@ -3804,6 +3805,11 @@ static int pbx_load_module(void)
}
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);
ael2_semantic_check(parse_tree, &sem_err, &sem_warn, &sem_note);