Skip to content
Snippets Groups Projects
Commit 14c12fed authored by Steve Murphy's avatar Steve Murphy
Browse files

The contents of branch teams/murf/bug_7598 are being folded in here.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent b57c2382
No related branches found
No related tags found
No related merge requests found
......@@ -24,34 +24,34 @@
typedef enum
{
PV_WORD, /* an ident, string, name, label, etc. A user-supplied string. */
PV_MACRO,
PV_CONTEXT,
PV_MACRO_CALL,
PV_APPLICATION_CALL,
PV_CASE,
PV_PATTERN,
PV_DEFAULT,
PV_CATCH,
PV_SWITCHES,
PV_ESWITCHES,
PV_INCLUDES,
PV_STATEMENTBLOCK,
PV_VARDEC, /* you know, var=val; */
PV_GOTO,
PV_LABEL,
PV_FOR,
PV_WHILE,
PV_BREAK,
PV_RETURN,
PV_CONTINUE,
PV_IF,
PV_IFTIME,
PV_RANDOM,
PV_SWITCH,
PV_EXTENSION,
PV_IGNOREPAT,
PV_GLOBALS,
PV_WORD, /* an ident, string, name, label, etc. A user-supplied string. */ /* 0 */
PV_MACRO, /* 1 */
PV_CONTEXT, /* 2 */
PV_MACRO_CALL, /* 3 */
PV_APPLICATION_CALL, /* 4 */
PV_CASE, /* 5 */
PV_PATTERN, /* 6 */
PV_DEFAULT, /* 7 */
PV_CATCH, /* 8 */
PV_SWITCHES, /* 9 */
PV_ESWITCHES, /* 10 */
PV_INCLUDES, /* 11 */
PV_STATEMENTBLOCK, /* 12 */
PV_VARDEC, /* you know, var=val; */ /* 13 */
PV_GOTO, /* 14 */
PV_LABEL, /* 15 */
PV_FOR, /* 16 */
PV_WHILE, /* 17 */
PV_BREAK, /* 18 */
PV_RETURN, /* 19 */
PV_CONTINUE, /* 20 */
PV_IF, /* 21 */
PV_IFTIME, /* 22 */
PV_RANDOM, /* 23 */
PV_SWITCH, /* 24 */
PV_EXTENSION, /* 25 */
PV_IGNOREPAT, /* 26 */
PV_GLOBALS, /* 27 */
} pvaltype;
......@@ -88,7 +88,8 @@ struct pval
struct pval *statements; /* used in case, default, catch, while's statement, CONTEXT elements, GLOBALS */
char *val; /* used in VARDEC */
char *for_test; /* used in FOR */
int label_in_case; /* a boolean for LABELs */
struct pval *goto_target; /* used in GOTO */
} u2;
union
......@@ -98,6 +99,8 @@ struct pval
struct pval *macro_statements; /* used in MACRO */
int abstract; /* used for context */
char *hints; /* used in EXTENSION */
int goto_target_in_case; /* used in GOTO */
struct ael_extension *compiled_label;
} u3;
union
......@@ -106,11 +109,11 @@ struct pval
int regexten; /* used in EXTENSION */
} u4;
struct pval *next; /* the pval at the end of this ptr will ALWAYS be of the same type as this one!
EXCEPT for objects of the different types, that are in the same list, like contexts & macros, etc */
struct pval *dad; /* the 'container' of this struct instance */
struct pval *prev; /* the opposite of the 'next' pointer */
} ;
......@@ -174,6 +177,8 @@ struct ael_extension
char *hints;
int regexten;
struct ast_context *context;
struct ael_priority *plist;
struct ael_priority *plist_last;
struct ael_extension *next_exten;
......
macro endsess()
{
NoOp(hithere);
}
macro nullchk(type)
{
NoOp(${type} is this);
}
macro endcall(type) {
switch(${type}) {
case out:
&nullchk(callid);
if(${testnotnull}) {
&endsess();
goto ptr1 ; // <-- goto call to valid label
}
else {
ptr1: // <-- valid label
Softhangup(${CHANNEL});
break ;
}
Noop(esac) ;
}
}
macro endcall2(type) {
switch(${type}) {
case out:
&nullchk(callid);
if(${testnotnull}) {
&endsess();
goto ptr1 ; // <-- goto call to valid label
}
case out2:
{
ptr1: // <-- valid label
Softhangup(${CHANNEL});
break ;
}
Noop(esac) ;
}
}
macro endcall3(type) {
switch(${type}) {
case out:
&nullchk(callid);
if(${testnotnull}) {
&endsess();
goto ptr1 ; // <-- goto call to valid label
}
Noop(esac) ;
}
if(${testnotnull}) {
goto ptr1;
}
switch(${type}) {
case out:
if(${testnotnull}) {
ptr1: // <-- valid label
Softhangup(${CHANNEL});
break ;
}
Noop(esac) ;
}
}
macro endcall4(type) {
switch(${type}) {
case out:
&nullchk(callid);
if(${testnotnull}) {
&endsess();
goto ptr1 ; // <-- goto call to valid label
}
Noop(esac) ;
}
if(${testnotnull}) {
goto ptr1;
}
switch(${type}) {
case out:
switch(${type})
{
case in:
if(${testnotnull}) {
ptr1: // <-- valid label
Softhangup(${CHANNEL});
break ;
}
Noop(esac) ;
}
}
}
macro endcall5(type) {
switch(${type}) {
case out:
&nullchk(callid);
if(${testnotnull}) {
&endsess();
goto ptr1 ; // <-- goto call to valid label
}
case in:
&nullchk(callid);
ptr2:
if(${testnotnull}) {
&endsess();
goto ptr1 ; // <-- goto call to valid label
}
Noop(esac) ;
}
if(${testnotnull}) {
goto ptr1;
}
switch(${type}) {
case out:
switch(${type})
{
case in:
if(${testnotnull}) {
ptr1: // <-- valid label
Softhangup(${CHANNEL});
break ;
}
Noop(esac) ;
}
}
}
context test1
{
s =>
{
goto lab1;
if( ${testnotnull} )
{
lab1:
NoOp(hello);
}
else
{
lab1:
MoOp(goodbye);
}
}
1 =>
{
lab1:
NoOp(This one is OK.);
}
}
macro endcall5(type) {
switch(${type}) {
case out:
if(${testnotnull}) {
NoOp(whoosh);
goto ptr1 ; // <-- goto call to valid label
}
case in:
ptr1: // The First label is the valid one...
if(${testnotnull}) {
NoOp(wow);
goto ptr1 ; // <-- goto call to valid label
}
Noop(esac) ;
}
if(${testnotnull}) {
goto ptr1;
}
switch(${type}) {
case out:
switch(${type})
{
case in:
if(${testnotnull}) {
ptr1: // <-- duplicate label (macros are about the equiv of an extension)
Softhangup(${CHANNEL});
break ;
}
Noop(esac) ;
}
}
}
Executed ast_register_file_version();
Executed ast_register_file_version();
Executed ast_register_file_version();
Executed ast_register_file_version();
(You can use the -n option if you aren't interested in seeing all the instructions generated by the compiler)
Executed ast_cli_register_multiple();
LOG: lev:2 file:../pbx/pbx_ael.c line:3732 func: pbx_load_module Starting AEL load process.
LOG: lev:2 file:../pbx/pbx_ael.c line:3739 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
LOG: lev:2 file:../pbx/pbx_ael.c line:3742 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
LOG: lev:2 file:../pbx/pbx_ael.c line:3745 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
Executed ast_context_create(conts, name=macro-endsess, registrar=pbx_ael);
Executed ast_context_create(conts, name=macro-nullchk, registrar=pbx_ael);
Executed ast_context_create(conts, name=macro-endcall, registrar=pbx_ael);
Executed ast_context_create(conts, name=macro-endcall2, registrar=pbx_ael);
Executed ast_context_create(conts, name=macro-endcall3, registrar=pbx_ael);
Executed ast_context_create(conts, name=macro-endcall4, registrar=pbx_ael);
Executed ast_context_create(conts, name=macro-endcall5, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=s, priority=1, label=(null), callerid=(null), appl=NoOp, data=hithere, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=s, priority=1, label=(null), callerid=(null), appl=Set, data=type=${ARG1}, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=s, priority=2, label=(null), callerid=(null), appl=NoOp, data=${type} is this, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=s, priority=1, label=(null), callerid=(null), appl=Set, data=type=${ARG1}, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=s, priority=2, label=(null), callerid=(null), appl=Goto, data=sw-1-${type}|1, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=s, priority=3, label=(null), callerid=(null), appl=NoOp, data=Finish switch-endcall-1, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-1-out, priority=1, label=(null), callerid=(null), appl=Macro, data=nullchk|callid, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-1-out, priority=2, label=(null), callerid=(null), appl=GotoIf, data=$[${testnotnull}]?3:6, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-1-out, priority=3, label=(null), callerid=(null), appl=Macro, data=endsess, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-1-out, priority=4, label=(null), callerid=(null), appl=Goto, data=sw-1-out|ptr1, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-1-out, priority=5, label=(null), callerid=(null), appl=Goto, data=8, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-1-out, priority=6, label=ptr1, callerid=(null), appl=Softhangup, data=${CHANNEL}, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-1-out, priority=7, label=(null), callerid=(null), appl=Goto, data=s|3, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-1-out, priority=8, label=(null), callerid=(null), appl=NoOp, data=Finish if-sw-endcall-out-1-2, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-1-out, priority=9, label=(null), callerid=(null), appl=Noop, data=esac, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-1-out, priority=10, label=(null), callerid=(null), appl=Goto, data=s|3, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=s, priority=1, label=(null), callerid=(null), appl=Set, data=type=${ARG1}, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=s, priority=2, label=(null), callerid=(null), appl=Goto, data=sw-3-${type}|1, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=s, priority=3, label=(null), callerid=(null), appl=NoOp, data=Finish switch-endcall2-3, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-3-out2, priority=1, label=ptr1, callerid=(null), appl=Softhangup, data=${CHANNEL}, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-3-out2, priority=2, label=(null), callerid=(null), appl=Goto, data=s|3, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-3-out2, priority=3, label=(null), callerid=(null), appl=Noop, data=esac, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-3-out2, priority=4, label=(null), callerid=(null), appl=Goto, data=s|3, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-3-out, priority=1, label=(null), callerid=(null), appl=Macro, data=nullchk|callid, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-3-out, priority=2, label=(null), callerid=(null), appl=GotoIf, data=$[${testnotnull}]?3:5, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-3-out, priority=3, label=(null), callerid=(null), appl=Macro, data=endsess, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-3-out, priority=4, label=(null), callerid=(null), appl=Goto, data=sw-3-out2|ptr1, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-3-out, priority=5, label=(null), callerid=(null), appl=NoOp, data=Finish if-sw-endcall2-out-3-4, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-3-out, priority=6, label=(null), callerid=(null), appl=Goto, data=sw-3-out2|1, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=s, priority=1, label=(null), callerid=(null), appl=Set, data=type=${ARG1}, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=s, priority=2, label=(null), callerid=(null), appl=Goto, data=sw-5-${type}|1, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=s, priority=3, label=(null), callerid=(null), appl=NoOp, data=Finish switch-endcall3-5, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=s, priority=4, label=(null), callerid=(null), appl=GotoIf, data=$[${testnotnull}]?5:6, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=s, priority=5, label=(null), callerid=(null), appl=Goto, data=sw-8-out|ptr1, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=s, priority=6, label=(null), callerid=(null), appl=NoOp, data=Finish if-endcall3-7, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=s, priority=7, label=(null), callerid=(null), appl=Goto, data=sw-8-${type}|1, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=s, priority=8, label=(null), callerid=(null), appl=NoOp, data=Finish switch-endcall3-8, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-8-out, priority=1, label=(null), callerid=(null), appl=GotoIf, data=$[${testnotnull}]?2:4, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-8-out, priority=2, label=ptr1, callerid=(null), appl=Softhangup, data=${CHANNEL}, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-8-out, priority=3, label=(null), callerid=(null), appl=Goto, data=s|8, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-8-out, priority=4, label=(null), callerid=(null), appl=NoOp, data=Finish if-sw-endcall3-out-8-9, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-8-out, priority=5, label=(null), callerid=(null), appl=Noop, data=esac, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-8-out, priority=6, label=(null), callerid=(null), appl=Goto, data=s|8, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-5-out, priority=1, label=(null), callerid=(null), appl=Macro, data=nullchk|callid, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-5-out, priority=2, label=(null), callerid=(null), appl=GotoIf, data=$[${testnotnull}]?3:5, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-5-out, priority=3, label=(null), callerid=(null), appl=Macro, data=endsess, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-5-out, priority=4, label=(null), callerid=(null), appl=Goto, data=sw-8-out|ptr1, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-5-out, priority=5, label=(null), callerid=(null), appl=NoOp, data=Finish if-sw-endcall3-out-5-6, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-5-out, priority=6, label=(null), callerid=(null), appl=Noop, data=esac, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-5-out, priority=7, label=(null), callerid=(null), appl=Goto, data=s|3, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=s, priority=1, label=(null), callerid=(null), appl=Set, data=type=${ARG1}, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=s, priority=2, label=(null), callerid=(null), appl=Goto, data=sw-10-${type}|1, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=s, priority=3, label=(null), callerid=(null), appl=NoOp, data=Finish switch-endcall4-10, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=s, priority=4, label=(null), callerid=(null), appl=GotoIf, data=$[${testnotnull}]?5:6, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=s, priority=5, label=(null), callerid=(null), appl=Goto, data=sw-14-in|ptr1, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=s, priority=6, label=(null), callerid=(null), appl=NoOp, data=Finish if-endcall4-12, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=s, priority=7, label=(null), callerid=(null), appl=Goto, data=sw-13-${type}|1, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=s, priority=8, label=(null), callerid=(null), appl=NoOp, data=Finish switch-endcall4-13, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-13-out, priority=1, label=(null), callerid=(null), appl=Goto, data=sw-14-${type}|1, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-13-out, priority=2, label=(null), callerid=(null), appl=NoOp, data=Finish switch-sw-endcall4-out-13-14, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-13-out, priority=3, label=(null), callerid=(null), appl=Goto, data=s|8, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-14-in, priority=1, label=(null), callerid=(null), appl=GotoIf, data=$[${testnotnull}]?2:4, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-14-in, priority=2, label=ptr1, callerid=(null), appl=Softhangup, data=${CHANNEL}, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-14-in, priority=3, label=(null), callerid=(null), appl=Goto, data=sw-13-out|2, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-14-in, priority=4, label=(null), callerid=(null), appl=NoOp, data=Finish if-sw-sw-endcall4-out-13-in-14-15, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-14-in, priority=5, label=(null), callerid=(null), appl=Noop, data=esac, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-14-in, priority=6, label=(null), callerid=(null), appl=Goto, data=sw-13-out|2, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-10-out, priority=1, label=(null), callerid=(null), appl=Macro, data=nullchk|callid, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-10-out, priority=2, label=(null), callerid=(null), appl=GotoIf, data=$[${testnotnull}]?3:5, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-10-out, priority=3, label=(null), callerid=(null), appl=Macro, data=endsess, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-10-out, priority=4, label=(null), callerid=(null), appl=Goto, data=sw-14-in|ptr1, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-10-out, priority=5, label=(null), callerid=(null), appl=NoOp, data=Finish if-sw-endcall4-out-10-11, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-10-out, priority=6, label=(null), callerid=(null), appl=Noop, data=esac, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-10-out, priority=7, label=(null), callerid=(null), appl=Goto, data=s|3, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=s, priority=1, label=(null), callerid=(null), appl=Set, data=type=${ARG1}, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=s, priority=2, label=(null), callerid=(null), appl=Goto, data=sw-16-${type}|1, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=s, priority=3, label=(null), callerid=(null), appl=NoOp, data=Finish switch-endcall5-16, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=s, priority=4, label=(null), callerid=(null), appl=GotoIf, data=$[${testnotnull}]?5:6, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=s, priority=5, label=(null), callerid=(null), appl=Goto, data=sw-21-in|ptr1, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=s, priority=6, label=(null), callerid=(null), appl=NoOp, data=Finish if-endcall5-19, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=s, priority=7, label=(null), callerid=(null), appl=Goto, data=sw-20-${type}|1, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=s, priority=8, label=(null), callerid=(null), appl=NoOp, data=Finish switch-endcall5-20, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-20-out, priority=1, label=(null), callerid=(null), appl=Goto, data=sw-21-${type}|1, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-20-out, priority=2, label=(null), callerid=(null), appl=NoOp, data=Finish switch-sw-endcall5-out-20-21, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-20-out, priority=3, label=(null), callerid=(null), appl=Goto, data=s|8, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-21-in, priority=1, label=(null), callerid=(null), appl=GotoIf, data=$[${testnotnull}]?2:4, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-21-in, priority=2, label=ptr1, callerid=(null), appl=Softhangup, data=${CHANNEL}, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-21-in, priority=3, label=(null), callerid=(null), appl=Goto, data=sw-20-out|2, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-21-in, priority=4, label=(null), callerid=(null), appl=NoOp, data=Finish if-sw-sw-endcall5-out-20-in-21-22, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-21-in, priority=5, label=(null), callerid=(null), appl=Noop, data=esac, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-21-in, priority=6, label=(null), callerid=(null), appl=Goto, data=sw-20-out|2, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-16-in, priority=1, label=(null), callerid=(null), appl=Macro, data=nullchk|callid, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-16-in, priority=2, label=ptr2, callerid=(null), appl=GotoIf, data=$[${testnotnull}]?3:5, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-16-in, priority=3, label=(null), callerid=(null), appl=Macro, data=endsess, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-16-in, priority=4, label=(null), callerid=(null), appl=Goto, data=sw-21-in|ptr1, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-16-in, priority=5, label=(null), callerid=(null), appl=NoOp, data=Finish if-sw-endcall5-in-16-18, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-16-in, priority=6, label=(null), callerid=(null), appl=Noop, data=esac, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-16-in, priority=7, label=(null), callerid=(null), appl=Goto, data=s|3, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-16-out, priority=1, label=(null), callerid=(null), appl=Macro, data=nullchk|callid, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-16-out, priority=2, label=(null), callerid=(null), appl=GotoIf, data=$[${testnotnull}]?3:5, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-16-out, priority=3, label=(null), callerid=(null), appl=Macro, data=endsess, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-16-out, priority=4, label=(null), callerid=(null), appl=Goto, data=sw-21-in|ptr1, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-16-out, priority=5, label=(null), callerid=(null), appl=NoOp, data=Finish if-sw-endcall5-out-16-17, FREE, registrar=pbx_ael);
Executed ast_add_extension2(con, rep=0, exten=sw-16-out, priority=6, label=(null), callerid=(null), appl=Goto, data=sw-16-in|1, FREE, registrar=pbx_ael);
LOG: lev:2 file:../pbx/pbx_ael.c line:3747 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
Executed ast_merge_contexts_and_delete();
LOG: lev:2 file:../pbx/pbx_ael.c line:3750 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
Executed ast_walk_contexts();
LOG: lev:2 file:../pbx/pbx_ael.c line:3753 func: pbx_load_module AEL load process: verified config file name './extensions.ael'.
LOG: lev:4 file:ael2_parse line:253 func: main 7 contexts, 17 extensions, 104 priorities
Executed ast_unregister_file_version();
Executed ast_unregister_file_version();
Executed ast_unregister_file_version();
Executed ast_unregister_file_version();
Executed ast_register_file_version();
Executed ast_register_file_version();
Executed ast_register_file_version();
Executed ast_register_file_version();
LOG: lev:2 file:../pbx/pbx_ael.c line:3732 func: pbx_load_module Starting AEL load process.
LOG: lev:2 file:../pbx/pbx_ael.c line:3739 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
LOG: lev:2 file:../pbx/pbx_ael.c line:3742 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
LOG: lev:4 file:../pbx/pbx_ael.c line:1041 func: check_label Error: file ./extensions.ael, line 13-13: Duplicate label lab1! Previously defined at file ./extensions.ael, line 8.
LOG: lev:4 file:../pbx/pbx_ael.c line:1041 func: check_label Error: file ./extensions.ael, line 49-49: Duplicate label ptr1! Previously defined at file ./extensions.ael, line 33.
LOG: lev:4 file:../pbx/pbx_ael.c line:3755 func: pbx_load_module Sorry, but 0 syntax errors and 2 semantic errors were detected. It doesn't make sense to compile.
LOG: lev:4 file:ael2_parse line:253 func: main 0 contexts, 0 extensions, 0 priorities
Executed ast_register_file_version();
LOG: lev:2 file:../pbx/pbx_ael.c line:3428 func: pbx_load_module Starting AEL load process.
LOG: lev:2 file:../pbx/pbx_ael.c line:3435 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
LOG: lev:2 file:ael.flex line:467 func: ael_yylex --Read in included file ./include1.ael2, 78 chars
LOG: lev:2 file:ael.flex line:467 func: ael_yylex --Read in included file ./include2.ael2, 98 chars
LOG: lev:2 file:ael.flex line:467 func: ael_yylex --Read in included file ./include3.ael2, 57 chars
LOG: lev:2 file:ael.flex line:467 func: ael_yylex --Read in included file ./include5.ael2, 56 chars
LOG: lev:2 file:ael.flex line:467 func: ael_yylex --Read in included file ./include4.ael2, 87 chars
LOG: lev:2 file:ael.flex line:467 func: ael_yylex --Read in included file /etc/asterisk/telemarket_torture.ael2, 28036 chars
LOG: lev:2 file:../pbx/pbx_ael.c line:3438 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
LOG: lev:3 file:../pbx/pbx_ael.c line:2186 func: check_pval_item Warning: file ./extensions.ael, line 5-5: expression Console/dsp has operators, but no variables. Interesting...
LOG: lev:3 file:../pbx/pbx_ael.c line:2186 func: check_pval_item Warning: file ./extensions.ael, line 8-8: expression "Joe-Worker" has operators, but no variables. Interesting...
LOG: lev:3 file:../pbx/pbx_ael.c line:2186 func: check_pval_item Warning: file ./extensions.ael, line 10-10: expression Zap/6 has operators, but no variables. Interesting...
LOG: lev:2 file:../pbx/pbx_ael.c line:3441 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
LOG: lev:2 file:../pbx/pbx_ael.c line:3443 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
LOG: lev:2 file:../pbx/pbx_ael.c line:3446 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
LOG: lev:2 file:../pbx/pbx_ael.c line:3449 func: pbx_load_module AEL load process: verified config file name './extensions.ael'.
LOG: lev:4 file:ael2_parse line:261 func: main 172 contexts, 858 extensions, 2326 priorities
Executed ast_register_file_version();
Executed ast_register_file_version();
Executed ast_register_file_version();
LOG: lev:2 file:../pbx/pbx_ael.c line:3732 func: pbx_load_module Starting AEL load process.
LOG: lev:2 file:../pbx/pbx_ael.c line:3739 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
LOG: lev:2 file:ael.flex line:422 func: ael_yylex --Read in included file ./include1.ael2, 78 chars
LOG: lev:2 file:ael.flex line:422 func: ael_yylex --Read in included file ./include2.ael2, 98 chars
LOG: lev:2 file:ael.flex line:422 func: ael_yylex --Read in included file ./include3.ael2, 57 chars
LOG: lev:2 file:ael.flex line:422 func: ael_yylex --Read in included file ./include5.ael2, 56 chars
LOG: lev:2 file:ael.flex line:422 func: ael_yylex --Read in included file ./include4.ael2, 87 chars
LOG: lev:2 file:ael.flex line:422 func: ael_yylex --Read in included file /etc/asterisk/telemarket_torture.ael2, 28036 chars
LOG: lev:2 file:../pbx/pbx_ael.c line:3742 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
LOG: lev:2 file:../pbx/pbx_ael.c line:3745 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
LOG: lev:2 file:../pbx/pbx_ael.c line:3747 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
LOG: lev:2 file:../pbx/pbx_ael.c line:3750 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
LOG: lev:2 file:../pbx/pbx_ael.c line:3753 func: pbx_load_module AEL load process: verified config file name './extensions.ael'.
LOG: lev:4 file:ael2_parse line:253 func: main 172 contexts, 858 extensions, 2326 priorities
Executed ast_register_file_version();
LOG: lev:2 file:../pbx/pbx_ael.c line:3428 func: pbx_load_module Starting AEL load process.
LOG: lev:2 file:../pbx/pbx_ael.c line:3435 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
LOG: lev:2 file:../pbx/pbx_ael.c line:3438 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
LOG: lev:3 file:../pbx/pbx_ael.c line:2186 func: check_pval_item Warning: file ./extensions.ael, line 6-6: expression Console/dsp has operators, but no variables. Interesting...
LOG: lev:3 file:../pbx/pbx_ael.c line:2186 func: check_pval_item Warning: file ./extensions.ael, line 10-10: expression pstn-spa3k has operators, but no variables. Interesting...
LOG: lev:4 file:../pbx/pbx_ael.c line:2055 func: check_pval_item Error: file ./extensions.ael, line 98-98: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments
LOG: lev:4 file:../pbx/pbx_ael.c line:2055 func: check_pval_item Error: file ./extensions.ael, line 107-107: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments
LOG: lev:4 file:../pbx/pbx_ael.c line:2055 func: check_pval_item Error: file ./extensions.ael, line 284-284: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments
LOG: lev:4 file:../pbx/pbx_ael.c line:2055 func: check_pval_item Error: file ./extensions.ael, line 287-287: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments
LOG: lev:4 file:../pbx/pbx_ael.c line:2036 func: check_pval_item Error: file ./extensions.ael, line 452-452: macro call to non-existent std-exten-ael !
LOG: lev:4 file:../pbx/pbx_ael.c line:3451 func: pbx_load_module Sorry, but 0 syntax errors and 5 semantic errors were detected. It doesn't make sense to compile.
LOG: lev:4 file:ael2_parse line:261 func: main 0 contexts, 0 extensions, 0 priorities
Executed ast_register_file_version();
Executed ast_register_file_version();
Executed ast_register_file_version();
LOG: lev:2 file:../pbx/pbx_ael.c line:3732 func: pbx_load_module Starting AEL load process.
LOG: lev:2 file:../pbx/pbx_ael.c line:3739 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
LOG: lev:2 file:../pbx/pbx_ael.c line:3742 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
LOG: lev:4 file:../pbx/pbx_ael.c line:2229 func: check_pval_item Error: file ./extensions.ael, line 98-98: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments
LOG: lev:4 file:../pbx/pbx_ael.c line:2229 func: check_pval_item Error: file ./extensions.ael, line 107-107: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments
LOG: lev:4 file:../pbx/pbx_ael.c line:2229 func: check_pval_item Error: file ./extensions.ael, line 284-284: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments
LOG: lev:4 file:../pbx/pbx_ael.c line:2229 func: check_pval_item Error: file ./extensions.ael, line 287-287: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments
LOG: lev:4 file:../pbx/pbx_ael.c line:2210 func: check_pval_item Error: file ./extensions.ael, line 452-452: macro call to non-existent std-exten-ael !
LOG: lev:4 file:../pbx/pbx_ael.c line:3755 func: pbx_load_module Sorry, but 0 syntax errors and 5 semantic errors were detected. It doesn't make sense to compile.
LOG: lev:4 file:ael2_parse line:253 func: main 0 contexts, 0 extensions, 0 priorities
This diff is collapsed.
......@@ -34,7 +34,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/ael_structs.h"
static pval * linku1(pval *head, pval *tail);
static void set_dads(pval *dad, pval *child_list);
void reset_parencount(yyscan_t yyscanner);
void reset_semicount(yyscan_t yyscanner);
void reset_argcount(yyscan_t yyscanner );
......@@ -204,6 +204,7 @@ 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; }
;
......@@ -214,12 +215,14 @@ opt_abstract: KW_ABSTRACT { $$ = 1; }
macro : KW_MACRO word LP arglist RP LC macro_statements RC {
$$ = npval2(PV_MACRO, &@1, &@8);
$$->u1.str = $2; $$->u2.arglist = $4; $$->u3.macro_statements = $7; }
$$->u1.str = $2; $$->u2.arglist = $4; $$->u3.macro_statements = $7;
set_dads($$,$7);}
;
globals : KW_GLOBALS LC global_statements RC {
$$ = npval2(PV_GLOBALS, &@1, &@4);
$$->u1.statements = $3;}
$$->u1.statements = $3;
set_dads($$,$3);}
;
global_statements : { $$ = NULL; }
......@@ -263,21 +266,21 @@ ignorepat : KW_IGNOREPAT EXTENMARK word SEMI {
extension : word EXTENMARK statement {
$$ = npval2(PV_EXTENSION, &@1, &@3);
$$->u1.str = $1;
$$->u2.statements = $3; }
$$->u2.statements = $3; set_dads($$,$3);}
| KW_REGEXTEN word EXTENMARK statement {
$$ = npval2(PV_EXTENSION, &@1, &@4);
$$->u1.str = $2;
$$->u2.statements = $4;
$$->u2.statements = $4; set_dads($$,$4);
$$->u4.regexten=1;}
| KW_HINT LP word3_list RP word EXTENMARK statement {
$$ = npval2(PV_EXTENSION, &@1, &@7);
$$->u1.str = $5;
$$->u2.statements = $7;
$$->u2.statements = $7; set_dads($$,$7);
$$->u3.hints = $3;}
| KW_REGEXTEN KW_HINT LP word3_list RP word EXTENMARK statement {
$$ = npval2(PV_EXTENSION, &@1, &@8);
$$->u1.str = $6;
$$->u2.statements = $8;
$$->u2.statements = $8; set_dads($$,$8);
$$->u4.regexten=1;
$$->u3.hints = $4;}
......@@ -366,7 +369,7 @@ goto_word : word { $$ = $1;}
switch_statement : KW_SWITCH test_expr LC case_statements RC {
$$ = npval2(PV_SWITCH, &@1, &@5);
$$->u1.str = $2;
$$->u2.statements = $4;}
$$->u2.statements = $4; set_dads($$,$4);}
;
/*
......@@ -374,7 +377,7 @@ switch_statement : KW_SWITCH test_expr LC case_statements RC {
*/
statement : LC statements RC {
$$ = npval2(PV_STATEMENTBLOCK, &@1, &@3);
$$->u1.list = $2; }
$$->u1.list = $2; set_dads($$,$2);}
| assignment { $$ = $1; }
| KW_GOTO target SEMI {
$$ = npval2(PV_GOTO, &@1, &@3);
......@@ -392,11 +395,11 @@ statement : LC statements RC {
$$->u1.for_init = $4;
$$->u2.for_test=$7;
$$->u3.for_inc = $10;
$$->u4.for_statements = $12;}
$$->u4.for_statements = $12; set_dads($$,$12);}
| KW_WHILE test_expr statement {
$$ = npval2(PV_WHILE, &@1, &@3);
$$->u1.str = $2;
$$->u2.statements = $3; }
$$->u2.statements = $3; set_dads($$,$3);}
| switch_statement { $$ = $1; }
| AMPER macro_call SEMI { $$ = update_last($2, &@2); }
| application_call SEMI { $$ = update_last($1, &@2); }
......@@ -441,8 +444,8 @@ statement : LC statements RC {
| KW_CONTINUE SEMI { $$ = npval2(PV_CONTINUE, &@1, &@2); }
| if_like_head statement opt_else {
$$ = update_last($1, &@2);
$$->u2.statements = $2;
$$->u3.else_statements = $3;}
$$->u2.statements = $2; set_dads($$,$2);
$$->u3.else_statements = $3;set_dads($$,$3);}
| SEMI { $$=0; }
;
......@@ -541,15 +544,15 @@ case_statements: /* empty */ { $$ = NULL; }
case_statement: KW_CASE word COLON statements {
$$ = npval2(PV_CASE, &@1, &@3); /* XXX 3 or 4 ? */
$$->u1.str = $2;
$$->u2.statements = $4;}
$$->u2.statements = $4; set_dads($$,$4);}
| KW_DEFAULT COLON statements {
$$ = npval2(PV_DEFAULT, &@1, &@3);
$$->u1.str = NULL;
$$->u2.statements = $3;}
$$->u2.statements = $3;set_dads($$,$3);}
| KW_PATTERN word COLON statements {
$$ = npval2(PV_PATTERN, &@1, &@4); /* XXX@3 or @4 ? */
$$->u1.str = $2;
$$->u2.statements = $4;}
$$->u2.statements = $4;set_dads($$,$4);}
;
macro_statements: /* empty */ { $$ = NULL; }
......@@ -560,17 +563,17 @@ macro_statement : statement {$$=$1;}
| KW_CATCH word LC statements RC {
$$ = npval2(PV_CATCH, &@1, &@5);
$$->u1.str = $2;
$$->u2.statements = $4;}
$$->u2.statements = $4; set_dads($$,$4);}
;
switches : KW_SWITCHES LC switchlist RC {
$$ = npval2(PV_SWITCHES, &@1, &@2);
$$->u1.list = $3; }
$$->u1.list = $3; set_dads($$,$3);}
;
eswitches : KW_ESWITCHES LC switchlist RC {
$$ = npval2(PV_ESWITCHES, &@1, &@2);
$$->u1.list = $3; }
$$->u1.list = $3; set_dads($$,$3);}
;
switchlist : /* empty */ { $$ = NULL; }
......@@ -593,7 +596,7 @@ includeslist : included_entry SEMI { $$ = $1; }
includes : KW_INCLUDES LC includeslist RC {
$$ = npval2(PV_INCLUDES, &@1, &@4);
$$->u1.list = $3;}
$$->u1.list = $3;set_dads($$,$3);}
| KW_INCLUDES LC RC {
$$ = npval2(PV_INCLUDES, &@1, &@3);}
;
......@@ -784,6 +787,17 @@ static pval * linku1(pval *head, pval *tail)
head->u1_last->next = tail;
}
head->u1_last = tail;
tail->prev = head; /* the dad link only points to containers */
}
return head;
}
/* this routine adds a dad ptr to each element in the list */
static void set_dads(struct pval *dad, struct pval *child_list)
{
struct pval *t;
for(t=child_list;t;t=t->next) /* simple stuff */
t->dad = dad;
}
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment