aboutsummaryrefslogtreecommitdiffstats
path: root/pbx/pbx_ael.c
diff options
context:
space:
mode:
authormurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-05 22:04:22 +0000
committermurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-05 22:04:22 +0000
commit1de82b08fcc7c458314f6c8c2a05fd97ceac01a7 (patch)
treed55541d274887966c0d7d47f37068a603922ee77 /pbx/pbx_ael.c
parent733f0e608dfcbfb7cf353b6f21adc9c87cfa3662 (diff)
Merged revisions 67526 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r67526 | murf | 2007-06-05 15:30:18 -0600 (Tue, 05 Jun 2007) | 1 line this fixes bug 9883, wherein macros were not allowing the includes construct. fixed and tested, looks OK. Now includes can serve as an adjunct to catch. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67529 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx/pbx_ael.c')
-rw-r--r--pbx/pbx_ael.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/pbx/pbx_ael.c b/pbx/pbx_ael.c
index 5d3518c03..c2b12aa0b 100644
--- a/pbx/pbx_ael.c
+++ b/pbx/pbx_ael.c
@@ -3891,7 +3891,29 @@ void ast_compile_ael2(struct ast_context **local_contexts, struct pval *root)
np2->appargs = strdup(buf);
linkprio(exten, np2);
}
-
+ /* add any includes */
+ for (p2=p->u3.macro_statements; p2; p2=p2->next) {
+ pval *p3;
+
+ switch (p2->type) {
+ case PV_INCLUDES:
+ for (p3 = p2->u1.list; p3 ;p3=p3->next) {
+ if ( p3->u2.arglist ) {
+ snprintf(buf,sizeof(buf), "%s|%s|%s|%s|%s",
+ p3->u1.str,
+ p3->u2.arglist->u1.str,
+ p3->u2.arglist->next->u1.str,
+ p3->u2.arglist->next->next->u1.str,
+ p3->u2.arglist->next->next->next->u1.str);
+ ast_context_add_include2(context, buf, registrar);
+ } else
+ ast_context_add_include2(context, p3->u1.str, registrar);
+ }
+ break;
+ default:
+ break;
+ }
+ }
/* CONTAINS APPCALLS, CATCH, just like extensions... */
gen_prios(exten, p->u1.str, p->u3.macro_statements, 0, context );
if (exten->return_needed) { /* most likely, this will go away */