aboutsummaryrefslogtreecommitdiffstats
path: root/res/ael/ael.flex
diff options
context:
space:
mode:
authormurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-24 13:21:29 +0000
committermurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-24 13:21:29 +0000
commitf7ffafc70a52b322c748e1cebb1dc434306aa951 (patch)
tree9060be3487bec6b9584705151fa274714ba03c4c /res/ael/ael.flex
parenteaff46c5d7015bc3b28d1630f5555a97e7fe6f30 (diff)
closes issue #11005, where #include uses the current dir instead of the config dir (/etc/asterisk) for relative path includes for AEL
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86967 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/ael/ael.flex')
-rw-r--r--res/ael/ael.flex6
1 files changed, 5 insertions, 1 deletions
diff --git a/res/ael/ael.flex b/res/ael/ael.flex
index 46c1d84aa..5adaff1eb 100644
--- a/res/ael/ael.flex
+++ b/res/ael/ael.flex
@@ -406,7 +406,11 @@ includes { STORE_POS; return KW_INCLUDES;}
} else {
strncpy(fnamebuf, p1+1, p2-p1-1);
fnamebuf[p2-p1-1] = 0;
-
+ if (fnamebuf[0] != '/') {
+ char fnamebuf2[1024];
+ snprintf(fnamebuf2,sizeof(fnamebuf2), "%s/%s", (char *)ast_config_AST_CONFIG_DIR, fnamebuf);
+ ast_copy_string(fnamebuf,fnamebuf2,sizeof(fnamebuf));
+ }
#ifdef SOLARIS
glob_ret = glob(fnamebuf, GLOB_NOCHECK, NULL, &globbuf);
#else