[asterisk-commits] murf: branch murf/bug_7598 r38677 - in /team/murf/bug_7598: ./ pbx/ pbx/ael/a...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Aug 1 13:20:58 MST 2006


Author: murf
Date: Tue Aug  1 15:20:58 2006
New Revision: 38677

URL: http://svn.digium.com/view/asterisk?rev=38677&view=rev
Log:
Resolved the conflict with the changes submitted via 7635;
everything looks OK.



Added:
    team/murf/bug_7598/pbx/ael/ael-test/ael-ntest12/
      - copied from r38655, trunk/pbx/ael/ael-test/ael-ntest12/
    team/murf/bug_7598/pbx/ael/ael-test/ael-ntest12/extensions.ael   (props changed)
      - copied unchanged from r38655, trunk/pbx/ael/ael-test/ael-ntest12/extensions.ael
    team/murf/bug_7598/pbx/ael/ael-test/ref.ael-ntest12   (props changed)
      - copied unchanged from r38655, trunk/pbx/ael/ael-test/ref.ael-ntest12
Modified:
    team/murf/bug_7598/   (props changed)
    team/murf/bug_7598/pbx/pbx_ael.c
    team/murf/bug_7598/res/res_musiconhold.c

Propchange: team/murf/bug_7598/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Propchange: team/murf/bug_7598/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Aug  1 15:20:58 2006
@@ -1,1 +1,1 @@
-/trunk:1-38645
+/trunk:1-38675

Propchange: team/murf/bug_7598/pbx/ael/ael-test/ael-ntest12/extensions.ael
------------------------------------------------------------------------------
    svn:eol-style = native

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

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

Propchange: team/murf/bug_7598/pbx/ael/ael-test/ref.ael-ntest12
------------------------------------------------------------------------------
    svn:eol-style = native

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

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

Modified: team/murf/bug_7598/pbx/pbx_ael.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7598/pbx/pbx_ael.c?rev=38677&r1=38676&r2=38677&view=diff
==============================================================================
--- team/murf/bug_7598/pbx/pbx_ael.c (original)
+++ team/murf/bug_7598/pbx/pbx_ael.c Tue Aug  1 15:20:58 2006
@@ -156,6 +156,8 @@
 static void fix_gotos_in_extensions(struct ael_extension *exten);
 static pval *get_extension_or_contxt(pval *p);
 static pval *get_contxt(pval *p);
+static void remove_spaces_before_equals(char *str);
+
 
 /* PRETTY PRINTER FOR AEL:  ============================================================================= */
 
@@ -2706,6 +2708,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++;
+	}
+}
+
 static void gen_prios(struct ael_extension *exten, char *label, pval *statement, struct ael_extension *mother_exten, struct ast_context *this_context )
 {
 	pval *p,*p2,*p3;
@@ -2734,6 +2755,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);
@@ -2798,6 +2820,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) {
@@ -2812,6 +2835,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) {
@@ -3578,6 +3602,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);
 			}

Modified: team/murf/bug_7598/res/res_musiconhold.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7598/res/res_musiconhold.c?rev=38677&r1=38676&r2=38677&view=diff
==============================================================================
--- team/murf/bug_7598/res/res_musiconhold.c (original)
+++ team/murf/bug_7598/res/res_musiconhold.c Tue Aug  1 15:20:58 2006
@@ -195,6 +195,10 @@
 	struct moh_files_state *state = chan->music_state;
 
 	if (chan && state) {
+		if (chan->stream) {
+                        ast_closestream(chan->stream);
+                        chan->stream = NULL;
+                }
 		if (option_verbose > 2)
 			ast_verbose(VERBOSE_PREFIX_3 "Stopped music on hold on %s\n", chan->name);
 



More information about the asterisk-commits mailing list