[asterisk-commits] murf: trunk r38652 - in /trunk/pbx: ./ ael/ael-test/ ael/ael-test/ael-ntest12/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Aug 1 12:03:32 MST 2006


Author: murf
Date: Tue Aug  1 14:03:32 2006
New Revision: 38652

URL: http://svn.digium.com/view/asterisk?rev=38652&view=rev
Log:
This branch will resolve the bug 7635.


Added:
    trunk/pbx/ael/ael-test/ael-ntest12/
      - copied from r38651, team/murf/bug_7635/pbx/ael/ael-test/ael-ntest12/
    trunk/pbx/ael/ael-test/ael-ntest12/extensions.ael   (props changed)
      - copied unchanged from r38651, team/murf/bug_7635/pbx/ael/ael-test/ael-ntest12/extensions.ael
    trunk/pbx/ael/ael-test/ref.ael-ntest12   (with props)
Modified:
    trunk/pbx/pbx_ael.c

Propchange: trunk/pbx/ael/ael-test/ael-ntest12/extensions.ael
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: trunk/pbx/ael/ael-test/ael-ntest12/extensions.ael
------------------------------------------------------------------------------
    svn:keywords = Author Id Date Revision

Propchange: trunk/pbx/ael/ael-test/ael-ntest12/extensions.ael
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: trunk/pbx/ael/ael-test/ref.ael-ntest12
URL: http://svn.digium.com/view/asterisk/trunk/pbx/ael/ael-test/ref.ael-ntest12?rev=38652&view=auto
==============================================================================
--- trunk/pbx/ael/ael-test/ref.ael-ntest12 (added)
+++ trunk/pbx/ael/ael-test/ref.ael-ntest12 Tue Aug  1 14:03:32 2006
@@ -1,0 +1,36 @@
+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:3480 func: pbx_load_module  Starting AEL load process.
+LOG: lev:2 file:../pbx/pbx_ael.c  line:3487 func: pbx_load_module  AEL load process: calculated config file name './extensions.ael'.
+LOG: lev:2 file:../pbx/pbx_ael.c  line:3490 func: pbx_load_module  AEL load process: parsed config file name './extensions.ael'.
+LOG: lev:2 file:../pbx/pbx_ael.c  line:3493 func: pbx_load_module  AEL load process: checked config file name './extensions.ael'.
+Executed ast_context_create(conts, name=test1, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=771, priority=1, label=(null), callerid=(null), appl=Set, data=i=$[0], FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=771, priority=2, label=(null), callerid=(null), appl=GotoIf, data=$[ 
+			${i} <= 3]?3:6, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=771, priority=3, label=(null), callerid=(null), appl=NoOp, data=i is '${i}', FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=771, priority=4, label=(null), callerid=(null), appl=Set, data=i=$[ ${i} + 1 ], FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=771, priority=5, label=(null), callerid=(null), appl=Goto, data=2, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=771, priority=6, label=(null), callerid=(null), appl=NoOp, data=Finish for-test1-1, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=772, priority=1, label=(null), callerid=(null), appl=Set, data=i=$[0], FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=772, priority=2, label=(null), callerid=(null), appl=GotoIf, data=$[ ${i} <= 3]?3:6, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=772, priority=3, label=(null), callerid=(null), appl=NoOp, data=i is '${i}', FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=772, priority=4, label=(null), callerid=(null), appl=Set, data=i=$[ ${i} + 1 ], FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=772, priority=5, label=(null), callerid=(null), appl=Goto, data=2, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=772, priority=6, label=(null), callerid=(null), appl=NoOp, data=Finish for-test1-2, FREE, registrar=pbx_ael);
+LOG: lev:2 file:../pbx/pbx_ael.c  line:3495 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:3498 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:3501 func: pbx_load_module  AEL load process: verified config file name './extensions.ael'.
+LOG: lev:4 file:ael2_parse  line:253 func: main  1 contexts, 2 extensions, 12 priorities
+Executed ast_unregister_file_version();
+Executed ast_unregister_file_version();
+Executed ast_unregister_file_version();
+Executed ast_unregister_file_version();

Propchange: trunk/pbx/ael/ael-test/ref.ael-ntest12
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: trunk/pbx/ael/ael-test/ref.ael-ntest12
------------------------------------------------------------------------------
    svn:keywords = Author Id Date Revision

Propchange: trunk/pbx/ael/ael-test/ref.ael-ntest12
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: trunk/pbx/pbx_ael.c
URL: http://svn.digium.com/view/asterisk/trunk/pbx/pbx_ael.c?rev=38652&r1=38651&r2=38652&view=diff
==============================================================================
--- trunk/pbx/pbx_ael.c (original)
+++ trunk/pbx/pbx_ael.c Tue Aug  1 14:03:32 2006
@@ -149,6 +149,8 @@
 
 static struct pval *find_label_in_current_extension(const char *label);
 static struct pval *find_label_in_current_db(const char *context, const char *exten, const char *label);
+static void remove_spaces_before_equals(char *str);
+
 
 /* PRETTY PRINTER FOR AEL:  ============================================================================= */
 
@@ -2526,6 +2528,25 @@
 	exten->next_exten = add;
 }
 
+static void remove_spaces_before_equals(char *str)
+{
+	char *p;
+	while( str && *str && *str != '=' )
+	{
+		if( *str == ' ' || *str == '\n' || *str == '\r' || *str == '\t' )
+		{
+			p = str;
+			while( *p )
+			{
+				*p = *(p+1);
+				p++;
+			}
+		}
+		else
+			str++;
+	}
+}
+
 void gen_prios(struct ael_extension *exten, char *label, pval *statement, struct ael_extension *mother_exten )
 {
 	pval *p,*p2,*p3;
@@ -2554,6 +2575,7 @@
 			pr->type = AEL_APPCALL;
 			snprintf(buf1,sizeof(buf1),"%s=$[%s]", p->u1.str, p->u2.val);
 			pr->app = strdup("Set");
+			remove_spaces_before_equals(buf1);
 			pr->appargs = strdup(buf1);
 			pr->origin = p;
 			linkprio(exten, pr);
@@ -2612,6 +2634,7 @@
 			for_init->app = strdup("Set");
 			
 			strcpy(buf2,p->u1.for_init);
+			remove_spaces_before_equals(buf2);
 			strp = strchr(buf2, '=');
 			strp2 = strchr(p->u1.for_init, '=');
 			if (strp) {
@@ -2626,6 +2649,7 @@
 			for_inc->app = strdup("Set");
 
 			strcpy(buf2,p->u3.for_inc);
+			remove_spaces_before_equals(buf2);
 			strp = strchr(buf2, '=');
 			strp2 = strchr(p->u3.for_inc, '=');
 			if (strp) {
@@ -3308,6 +3332,7 @@
 				np2->type = AEL_APPCALL;
 				np2->app = strdup("Set");
 				snprintf(buf,sizeof(buf),"%s=${ARG%d}", lp->u1.str, argc++);
+				remove_spaces_before_equals(buf);
 				np2->appargs = strdup(buf);
 				linkprio(exten, np2);
 			}



More information about the asterisk-commits mailing list