aboutsummaryrefslogtreecommitdiffstats
path: root/pbx/ael/ael.y
diff options
context:
space:
mode:
authormurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-04 19:57:08 +0000
committermurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-04 19:57:08 +0000
commit66623b5e225ba1ad80282a89ad763f49acde2842 (patch)
treec161366ca635b93070ae6a12972966dfebf20fe0 /pbx/ael/ael.y
parentac1ade7444c3a81d76e879f6d3571aae3c8e7bae (diff)
These changes fix the problems reported in bug 8090
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@44380 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx/ael/ael.y')
-rw-r--r--pbx/ael/ael.y16
1 files changed, 11 insertions, 5 deletions
diff --git a/pbx/ael/ael.y b/pbx/ael/ael.y
index 81a76fd33..d32ded0a6 100644
--- a/pbx/ael/ael.y
+++ b/pbx/ael/ael.y
@@ -201,11 +201,17 @@ context_name : word { $$ = $1; }
;
context : opt_abstract KW_CONTEXT context_name LC elements RC {
- $$ = npval2(PV_CONTEXT, &@1, &@6);
- $$->u1.str = $3;
- $$->u2.statements = $5;
- set_dads($$,$5);
- $$->u3.abstract = $1; }
+ if (!$5) {
+ ast_log(LOG_WARNING, "==== File: %s, Line %d, Cols: %d-%d: Warning! The empty context %s will be IGNORED!\n",
+ my_file, @4.first_line, @4.first_column, @4.last_column, $3 );
+ free($3);
+
+ } else {
+ $$ = npval2(PV_CONTEXT, &@1, &@6);
+ $$->u1.str = $3;
+ $$->u2.statements = $5;
+ set_dads($$,$5);
+ $$->u3.abstract = $1;} }
;
/* optional "abstract" keyword XXX there is no regression test for this */