diff options
author | Steve Murphy <murf@digium.com> | 2007-10-24 13:21:29 +0000 |
---|---|---|
committer | Steve Murphy <murf@digium.com> | 2007-10-24 13:21:29 +0000 |
commit | b7ef49c93197f99d21b5e7fa3e3a6f3661048372 (patch) | |
tree | 9060be3487bec6b9584705151fa274714ba03c4c /res/ael/ael.flex | |
parent | d914cbee484b29c07a7f3455ec49b45d7d77d0f5 (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: https://origsvn.digium.com/svn/asterisk/trunk@86967 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/ael/ael.flex')
-rw-r--r-- | res/ael/ael.flex | 6 |
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 |