[svn-commits] murf: branch murf/bug_7638 r59142 - in /team/murf/bug_7638: ./ apps/ channels...

svn-commits at lists.digium.com svn-commits at lists.digium.com
Thu Mar 22 05:19:07 MST 2007


Author: murf
Date: Thu Mar 22 07:19:05 2007
New Revision: 59142

URL: http://svn.digium.com/view/asterisk?view=rev&rev=59142
Log:
Merged revisions 59036,59038,59041,59043,59050-59051,59071-59073,59077,59079-59080,59082-59083,59088,59090 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r59036 | bweschke | 2007-03-18 10:59:48 -0600 (Sun, 18 Mar 2007) | 11 lines

Merged revisions 59035 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r59035 | bweschke | 2007-03-18 12:36:44 -0400 (Sun, 18 Mar 2007) | 3 lines

 Don't return a non-zero return code if the profile doesn't exist, to match what the documentation says it already does. (#9307 Reported by kkiely)


........

................
r59038 | oej | 2007-03-18 14:39:37 -0600 (Sun, 18 Mar 2007) | 11 lines

Merged revisions 59037 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r59037 | oej | 2007-03-18 21:37:06 +0100 (Sun, 18 Mar 2007) | 3 lines

Issue #9313, Asterisk crash on SIP return code 0 (reported by qwerty1979)


........

................
r59041 | tilghman | 2007-03-19 09:43:15 -0600 (Mon, 19 Mar 2007) | 10 lines

Merged revisions 59040 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r59040 | tilghman | 2007-03-19 10:42:26 -0500 (Mon, 19 Mar 2007) | 2 lines

Fix unescaped semicolon (reported via -dev list)

........

................
r59043 | file | 2007-03-19 09:54:42 -0600 (Mon, 19 Mar 2007) | 9 lines

Blocked revisions 59042 via svnmerge

........
r59042 | file | 2007-03-19 11:52:28 -0400 (Mon, 19 Mar 2007) | 2 lines

Fix typo in help for CDR function. (issue #9295 reported by ajohnson)

........

................
r59050 | tilghman | 2007-03-19 16:31:14 -0600 (Mon, 19 Mar 2007) | 10 lines

Merged revisions 59049 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r59049 | tilghman | 2007-03-19 17:29:56 -0500 (Mon, 19 Mar 2007) | 2 lines

Oops, this should have been a %d all along

........

................
r59051 | file | 2007-03-19 16:32:40 -0600 (Mon, 19 Mar 2007) | 2 lines

It is possible for mod to become invalid after we unload it (if it's a dynamic module) so move it around a bit.

................
r59071 | murf | 2007-03-20 12:15:03 -0600 (Tue, 20 Mar 2007) | 1 line

blocking 59069... will commit these changes with separate patch
................
r59072 | murf | 2007-03-20 12:15:56 -0600 (Tue, 20 Mar 2007) | 1 line

blocking 59070... it was just a repair, doesn't need to be here
................
r59073 | murf | 2007-03-20 12:18:06 -0600 (Tue, 20 Mar 2007) | 1 line

The fix for the AEL <<security hole>> (bug 9316) is here...
................
r59077 | file | 2007-03-20 14:44:58 -0600 (Tue, 20 Mar 2007) | 10 lines

Merged revisions 59076 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r59076 | file | 2007-03-20 16:42:46 -0400 (Tue, 20 Mar 2007) | 2 lines

Copy len variable as well, should fix remaining IAX2 DTMF issues.

........

................
r59079 | tilghman | 2007-03-20 15:06:11 -0600 (Tue, 20 Mar 2007) | 10 lines

Merged revisions 59078 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r59078 | tilghman | 2007-03-20 16:04:52 -0500 (Tue, 20 Mar 2007) | 2 lines

Fix defines for inline stack backtraces (only used by developers anyway)

........

................
r59080 | file | 2007-03-20 20:46:02 -0600 (Tue, 20 Mar 2007) | 2 lines

Make the database show command spit out how many results it got. (issue #9332 reported by junky)

................
r59082 | file | 2007-03-20 21:27:58 -0600 (Tue, 20 Mar 2007) | 10 lines

Merged revisions 59081 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r59081 | file | 2007-03-20 23:25:48 -0400 (Tue, 20 Mar 2007) | 2 lines

Until we can do media level parsing for sendrecv/etc just use the first value found. This crept up when a phone was offered audio+video and returned an inactive video stream. chan_sip thought the phone said to put the person on hold but that was totally wrong. (issue #9319 reported by benbrown)

........

................
r59083 | file | 2007-03-20 21:33:57 -0600 (Tue, 20 Mar 2007) | 2 lines

Minor tweak. Only queue up an unhold control frame if we are actually on hold. This would have shown itself when a call was initially being setup and the SDP data was being parsed in.

................
r59088 | file | 2007-03-21 12:06:59 -0600 (Wed, 21 Mar 2007) | 18 lines

Merged revisions 59087 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r59087 | file | 2007-03-21 14:04:58 -0400 (Wed, 21 Mar 2007) | 10 lines

Merged revisions 59086 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r59086 | file | 2007-03-21 14:03:20 -0400 (Wed, 21 Mar 2007) | 2 lines

Indicate the filename changed when it is changed. (issue #9311 reported by jsmith)

........

................

................
r59090 | file | 2007-03-21 12:10:01 -0600 (Wed, 21 Mar 2007) | 10 lines

Merged revisions 59089 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r59089 | file | 2007-03-21 14:08:57 -0400 (Wed, 21 Mar 2007) | 2 lines

Add svg mimetype for pari.

........

................

Modified:
    team/murf/bug_7638/   (props changed)
    team/murf/bug_7638/apps/app_followme.c
    team/murf/bug_7638/channels/chan_sip.c
    team/murf/bug_7638/channels/iax2-parser.c
    team/murf/bug_7638/configs/sip_notify.conf.sample
    team/murf/bug_7638/funcs/func_strings.c
    team/murf/bug_7638/include/asterisk/ael_structs.h
    team/murf/bug_7638/main/db.c
    team/murf/bug_7638/main/http.c
    team/murf/bug_7638/main/loader.c
    team/murf/bug_7638/main/logger.c
    team/murf/bug_7638/main/pval.c
    team/murf/bug_7638/res/res_monitor.c
    team/murf/bug_7638/utils/extconf.c

Propchange: team/murf/bug_7638/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.

Propchange: team/murf/bug_7638/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/murf/bug_7638/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Mar 22 07:19:05 2007
@@ -1,1 +1,1 @@
-/trunk:1-59021
+/trunk:1-59140

Modified: team/murf/bug_7638/apps/app_followme.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/apps/app_followme.c?view=diff&rev=59142&r1=59141&r2=59142
==============================================================================
--- team/murf/bug_7638/apps/app_followme.c (original)
+++ team/murf/bug_7638/apps/app_followme.c Thu Mar 22 07:19:05 2007
@@ -952,7 +952,7 @@
 		ast_log(LOG_DEBUG, "New profile %s.\n", args.followmeid);
 	if (!f) { 
 		ast_log(LOG_WARNING, "Profile requested, %s, not found in the configuration.\n", args.followmeid);
-		res = -1;
+		res = 0;
 	} else {
 		/* XXX TODO: Reinsert the db check value to see whether or not follow-me is on or off */
 

Modified: team/murf/bug_7638/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/channels/chan_sip.c?view=diff&rev=59142&r1=59141&r2=59142
==============================================================================
--- team/murf/bug_7638/channels/chan_sip.c (original)
+++ team/murf/bug_7638/channels/chan_sip.c Thu Mar 22 07:19:05 2007
@@ -5082,7 +5082,7 @@
 	int codec;
 	int destiterator = 0;
 	int iterator;
-	int sendonly = 0;
+	int sendonly = -1;
 	int numberofports;
 	struct ast_rtp *newaudiortp, *newvideortp, *newtextrtp;	/* Buffers for codec handling */
 	int newjointcapability;				/* Negotiated capability */
@@ -5360,13 +5360,16 @@
 				continue;
 		}
 		if (!strcasecmp(a, "sendonly")) {
-			sendonly = 1;
+			if (sendonly == -1)
+				sendonly = 1;
 			continue;
 		} else if (!strcasecmp(a, "inactive")) {
-			sendonly = 2;
+			if (sendonly == -1)
+				sendonly = 2;
 			continue;
 		}  else if (!strcasecmp(a, "sendrecv")) {
-			sendonly = 0;
+			if (sendonly == -1)
+				sendonly = 0;
 			continue;
 		} else if (strlen(a) > 5 && !strncasecmp(a, "ptime", 5)) {
 			char *tmp = strrchr(a, ':');
@@ -5641,11 +5644,22 @@
 		ast_set_write_format(p->owner, p->owner->writeformat);
 	}
 	
-	if (sin.sin_addr.s_addr && !sendonly) {
+	if (ast_test_flag(&p->flags[1], SIP_PAGE2_CALL_ONHOLD) && sin.sin_addr.s_addr && (!sendonly || sendonly == -1)) {
 		ast_queue_control(p->owner, AST_CONTROL_UNHOLD);
 		/* Activate a re-invite */
 		ast_queue_frame(p->owner, &ast_null_frame);
-	} else if (!sin.sin_addr.s_addr || sendonly) {
+		/* Queue Manager Unhold event */
+		append_history(p, "Unhold", "%s", req->data);
+		if (global_callevents)
+			manager_event(EVENT_FLAG_CALL, "Unhold",
+				      "Channel: %s\r\n"
+				      "Uniqueid: %s\r\n",
+				      p->owner->name,
+				      p->owner->uniqueid);
+		if (global_notifyhold)
+			sip_peer_hold(p, FALSE);
+		ast_clear_flag(&p->flags[1], SIP_PAGE2_CALL_ONHOLD); /* Clear both flags */
+	} else if (!sin.sin_addr.s_addr || (sendonly && sendonly != -1)) {
 		ast_queue_control_data(p->owner, AST_CONTROL_HOLD, 
 				       S_OR(p->mohsuggest, NULL),
 				       !ast_strlen_zero(p->mohsuggest) ? strlen(p->mohsuggest) + 1 : 0);
@@ -5654,32 +5668,14 @@
 		/* RTCP needs to go ahead, even if we're on hold!!! */
 		/* Activate a re-invite */
 		ast_queue_frame(p->owner, &ast_null_frame);
-	}
-
-	/* Manager Hold and Unhold events must be generated, if necessary */
-	if (sin.sin_addr.s_addr && !sendonly) {
-		if (ast_test_flag(&p->flags[1], SIP_PAGE2_CALL_ONHOLD)) {
-			append_history(p, "Unhold", "%s", req->data);
-			if (global_callevents)
-				manager_event(EVENT_FLAG_CALL, "Unhold",
-					"Channel: %s\r\n"
-					"Uniqueid: %s\r\n",
-					p->owner->name, 
-					p->owner->uniqueid);
-			if (global_notifyhold)
-				sip_peer_hold(p, FALSE);
-		} 
-		ast_clear_flag(&p->flags[1], SIP_PAGE2_CALL_ONHOLD);	/* Clear both flags */
-	} else if (!sin.sin_addr.s_addr || sendonly ) {
-		/* No address for RTP, we're on hold */
+		/* Queue Manager Hold event */
 		append_history(p, "Hold", "%s", req->data);
-
 		if (global_callevents && !ast_test_flag(&p->flags[1], SIP_PAGE2_CALL_ONHOLD)) {
 			manager_event(EVENT_FLAG_CALL, "Hold",
-				"Channel: %s\r\n"
-				"Uniqueid: %s\r\n",
-				p->owner->name, 
-				p->owner->uniqueid);
+				      "Channel: %s\r\n"
+				      "Uniqueid: %s\r\n",
+				      p->owner->name, 
+				      p->owner->uniqueid);
 		}
 		if (sendonly == 1)	/* One directional hold (sendonly/recvonly) */
 			ast_set_flag(&p->flags[1], SIP_PAGE2_CALL_ONHOLD_ONEDIR);
@@ -15295,6 +15291,10 @@
 		if (sscanf(e, "%d %n", &respid, &len) != 1) {
 			ast_log(LOG_WARNING, "Invalid response: '%s'\n", e);
 		} else {
+			if (respid <= 0) {
+				ast_log(LOG_WARNING, "Invalid SIP response code: '%d'\n", respid);
+				return 0;
+			}
 			/* More SIP ridiculousness, we have to ignore bogus contacts in 100 etc responses */
 			if ((respid == 200) || ((respid >= 300) && (respid <= 399)))
 				extract_uri(p, req);

Modified: team/murf/bug_7638/channels/iax2-parser.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/channels/iax2-parser.c?view=diff&rev=59142&r1=59141&r2=59142
==============================================================================
--- team/murf/bug_7638/channels/iax2-parser.c (original)
+++ team/murf/bug_7638/channels/iax2-parser.c Thu Mar 22 07:19:05 2007
@@ -960,6 +960,7 @@
 	fr->af.delivery.tv_sec = 0;
 	fr->af.delivery.tv_usec = 0;
 	fr->af.data = fr->afdata;
+	fr->af.len = f->len;
 	if (fr->af.datalen) {
 #if __BYTE_ORDER == __LITTLE_ENDIAN
 		/* We need to byte-swap slinear samples from network byte order */

Modified: team/murf/bug_7638/configs/sip_notify.conf.sample
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/configs/sip_notify.conf.sample?view=diff&rev=59142&r1=59141&r2=59142
==============================================================================
--- team/murf/bug_7638/configs/sip_notify.conf.sample (original)
+++ team/murf/bug_7638/configs/sip_notify.conf.sample Thu Mar 22 07:19:05 2007
@@ -18,5 +18,5 @@
 
 ; Tested
 [snom-check-cfg]
-Event=>check-sync;reboot=false
+Event=>check-sync\;reboot=false
 Content-Length=>0

Modified: team/murf/bug_7638/funcs/func_strings.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/funcs/func_strings.c?view=diff&rev=59142&r1=59141&r2=59142
==============================================================================
--- team/murf/bug_7638/funcs/func_strings.c (original)
+++ team/murf/bug_7638/funcs/func_strings.c Thu Mar 22 07:19:05 2007
@@ -458,7 +458,7 @@
 				formatbuf[&arg.format[i] - formatstart + 1] = '\0';
 
 				/* Convert the argument into the required type */
-				if (sscanf(arg.var[argcount++], "%i", &tmpi) != 1) {
+				if (sscanf(arg.var[argcount++], "%d", &tmpi) != 1) {
 					ast_log(LOG_ERROR, "Argument '%s' is not an integer number for format '%s'\n", arg.var[argcount - 1], formatbuf);
 					goto sprintf_fail;
 				}

Modified: team/murf/bug_7638/include/asterisk/ael_structs.h
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/include/asterisk/ael_structs.h?view=diff&rev=59142&r1=59141&r2=59142
==============================================================================
--- team/murf/bug_7638/include/asterisk/ael_structs.h (original)
+++ team/murf/bug_7638/include/asterisk/ael_structs.h Thu Mar 22 07:19:05 2007
@@ -100,6 +100,7 @@
 	char *cidmatch;
 	char *hints;
 	int regexten;
+	int is_switch;
 	
 	struct ast_context *context;
 	

Modified: team/murf/bug_7638/main/db.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/main/db.c?view=diff&rev=59142&r1=59141&r2=59142
==============================================================================
--- team/murf/bug_7638/main/db.c (original)
+++ team/murf/bug_7638/main/db.c Thu Mar 22 07:19:05 2007
@@ -358,6 +358,7 @@
 	char *keys, *values;
 	int res;
 	int pass;
+	int counter = 0;
 
 	if (argc == 3) {
 		/* Key only */
@@ -389,9 +390,11 @@
 		}
 		if (subkeymatch(keys, suffix)) {
 				ast_cli(fd, "%-50s: %-25s\n", keys, values);
+				counter++;
 		}
 	}
 	ast_mutex_unlock(&dblock);
+	ast_cli(fd, "%d results found.\n", counter);
 	return RESULT_SUCCESS;	
 }
 

Modified: team/murf/bug_7638/main/http.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/main/http.c?view=diff&rev=59142&r1=59141&r2=59142
==============================================================================
--- team/murf/bug_7638/main/http.c (original)
+++ team/murf/bug_7638/main/http.c Thu Mar 22 07:19:05 2007
@@ -107,6 +107,7 @@
 	{ "js", "application/x-javascript" },
 	{ "wav", "audio/x-wav" },
 	{ "mp3", "audio/mpeg" },
+	{ "svg", "image/svg+xml" },
 };
 
 struct http_uri_redirect {

Modified: team/murf/bug_7638/main/loader.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/main/loader.c?view=diff&rev=59142&r1=59141&r2=59142
==============================================================================
--- team/murf/bug_7638/main/loader.c (original)
+++ team/murf/bug_7638/main/loader.c Thu Mar 22 07:19:05 2007
@@ -475,6 +475,9 @@
 
 	AST_LIST_UNLOCK(&module_list);
 
+	if (!error && !mod->lib)
+		mod->info->restore_globals();
+
 #if LOADABLE_MODULES
 	if (!error)
 		unload_dynamic_module(mod);
@@ -482,9 +485,6 @@
 
 	if (!error)
 		ast_update_use_count();
-
-	if (!error && !mod->lib)
-		mod->info->restore_globals();
 
 	return res;
 }

Modified: team/murf/bug_7638/main/logger.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/main/logger.c?view=diff&rev=59142&r1=59141&r2=59142
==============================================================================
--- team/murf/bug_7638/main/logger.c (original)
+++ team/murf/bug_7638/main/logger.c Thu Mar 22 07:19:05 2007
@@ -38,7 +38,7 @@
 #include <stdlib.h>
 #include <errno.h>
 #include <sys/stat.h>
-#ifdef STACK_BACKTRACES
+#if ((defined(AST_DEVMODE)) && (defined(Linux)))
 #include <execinfo.h>
 #define MAX_BACKTRACE_FRAMES 20
 #endif
@@ -956,7 +956,8 @@
 
 void ast_backtrace(void)
 {
-#ifdef STACK_BACKTRACES
+#ifdef Linux
+#ifdef AST_DEVMODE
 	int count=0, i=0;
 	void **addresses;
 	char **strings;
@@ -978,11 +979,10 @@
 		free(addresses);
 	}
 #else
-#ifdef Linux
-	ast_log(LOG_WARNING, "Must compile with 'make dont-optimize' for stack backtraces\n");
-#else
+	ast_log(LOG_WARNING, "Must run configure with '--enable-dev-mode' for stack backtraces.\n");
+#endif
+#else /* ndef Linux */
 	ast_log(LOG_WARNING, "Inline stack backtraces are only available on the Linux platform.\n");
-#endif
 #endif
 }
 

Modified: team/murf/bug_7638/main/pval.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/main/pval.c?view=diff&rev=59142&r1=59141&r2=59142
==============================================================================
--- team/murf/bug_7638/main/pval.c (original)
+++ team/murf/bug_7638/main/pval.c Thu Mar 22 07:19:05 2007
@@ -3178,7 +3178,7 @@
 			switch_end = new_prio();
 			switch_test->type = AEL_APPCALL;
 			switch_end->type = AEL_APPCALL;
-			snprintf(buf1,sizeof(buf1),"sw-%d-%s|1",control_statement_count, p->u1.str);
+			snprintf(buf1,sizeof(buf1),"sw-%d-%s|10",control_statement_count, p->u1.str);
 			switch_test->app = strdup("Goto");
 			switch_test->appargs = strdup(buf1);
 			snprintf(buf1,sizeof(buf1),"Finish switch-%s-%d", label, control_statement_count);
@@ -3200,6 +3200,7 @@
 					/* ok, generate a extension and link it in */
 					switch_case = new_exten();
 					switch_case->context = this_context;
+					switch_case->is_switch = 1;
 					/* the break/continue locations are inherited from parent */
 					switch_case->loop_break = exten->loop_break;
 					switch_case->loop_continue = exten->loop_continue;
@@ -3223,7 +3224,7 @@
 							fall_thru = new_prio();
 							fall_thru->type = AEL_APPCALL;
 							fall_thru->app = strdup("Goto");
-							snprintf(buf1,sizeof(buf1),"sw-%d-%s|1",local_control_statement_count, p2->next->u1.str);
+							snprintf(buf1,sizeof(buf1),"sw-%d-%s|10",local_control_statement_count, p2->next->u1.str);
 							fall_thru->appargs = strdup(buf1);
 							linkprio(switch_case, fall_thru);
 						} else if (p2->next && p2->next->type == PV_PATTERN) {
@@ -3231,14 +3232,14 @@
 							fall_thru->type = AEL_APPCALL;
 							fall_thru->app = strdup("Goto");
 							gen_match_to_pattern(p2->next->u1.str, buf2);
-							snprintf(buf1,sizeof(buf1),"sw-%d-%s|1", local_control_statement_count, buf2);
+							snprintf(buf1,sizeof(buf1),"sw-%d-%s|10", local_control_statement_count, buf2);
 							fall_thru->appargs = strdup(buf1);
 							linkprio(switch_case, fall_thru);
 						} else if (p2->next && p2->next->type == PV_DEFAULT) {
 							fall_thru = new_prio();
 							fall_thru->type = AEL_APPCALL;
 							fall_thru->app = strdup("Goto");
-							snprintf(buf1,sizeof(buf1),"sw-%d-.|1",local_control_statement_count);
+							snprintf(buf1,sizeof(buf1),"sw-%d-.|10",local_control_statement_count);
 							fall_thru->appargs = strdup(buf1);
 							linkprio(switch_case, fall_thru);
 						} else if (!p2->next) {
@@ -3263,6 +3264,7 @@
 					/* ok, generate a extension and link it in */
 					switch_case = new_exten();
 					switch_case->context = this_context;
+					switch_case->is_switch = 1;
 					/* the break/continue locations are inherited from parent */
 					switch_case->loop_break = exten->loop_break;
 					switch_case->loop_continue = exten->loop_continue;
@@ -3285,7 +3287,7 @@
 							fall_thru = new_prio();
 							fall_thru->type = AEL_APPCALL;
 							fall_thru->app = strdup("Goto");
-							snprintf(buf1,sizeof(buf1),"sw-%d-%s|1",local_control_statement_count, p2->next->u1.str);
+							snprintf(buf1,sizeof(buf1),"sw-%d-%s|10",local_control_statement_count, p2->next->u1.str);
 							fall_thru->appargs = strdup(buf1);
 							linkprio(switch_case, fall_thru);
 						} else if (p2->next && p2->next->type == PV_PATTERN) {
@@ -3293,14 +3295,14 @@
 							fall_thru->type = AEL_APPCALL;
 							fall_thru->app = strdup("Goto");
 							gen_match_to_pattern(p2->next->u1.str, buf2);
-							snprintf(buf1,sizeof(buf1),"sw-%d-%s|1",local_control_statement_count, buf2);
+							snprintf(buf1,sizeof(buf1),"sw-%d-%s|10",local_control_statement_count, buf2);
 							fall_thru->appargs = strdup(buf1);
 							linkprio(switch_case, fall_thru);
 						} else if (p2->next && p2->next->type == PV_DEFAULT) {
 							fall_thru = new_prio();
 							fall_thru->type = AEL_APPCALL;
 							fall_thru->app = strdup("Goto");
-							snprintf(buf1,sizeof(buf1),"sw-%d-.|1",local_control_statement_count);
+							snprintf(buf1,sizeof(buf1),"sw-%d-.|10",local_control_statement_count);
 							fall_thru->appargs = strdup(buf1);
 							linkprio(switch_case, fall_thru);
 						} else if (!p2->next) {
@@ -3326,6 +3328,7 @@
 					/* ok, generate a extension and link it in */
 					switch_case = new_exten();
 					switch_case->context = this_context;
+					switch_case->is_switch = 1;
 					/* the break/continue locations are inherited from parent */
 					switch_case->loop_break = exten->loop_break;
 					switch_case->loop_continue = exten->loop_continue;
@@ -3349,7 +3352,7 @@
 							fall_thru = new_prio();
 							fall_thru->type = AEL_APPCALL;
 							fall_thru->app = strdup("Goto");
-							snprintf(buf1,sizeof(buf1),"sw-%d-%s|1",local_control_statement_count, p2->next->u1.str);
+							snprintf(buf1,sizeof(buf1),"sw-%d-%s|10",local_control_statement_count, p2->next->u1.str);
 							fall_thru->appargs = strdup(buf1);
 							linkprio(switch_case, fall_thru);
 						} else if (p2->next && p2->next->type == PV_PATTERN) {
@@ -3357,14 +3360,14 @@
 							fall_thru->type = AEL_APPCALL;
 							fall_thru->app = strdup("Goto");
 							gen_match_to_pattern(p2->next->u1.str, buf2);
-							snprintf(buf1,sizeof(buf1),"sw-%d-%s|1",local_control_statement_count, buf2);
+							snprintf(buf1,sizeof(buf1),"sw-%d-%s|10",local_control_statement_count, buf2);
 							fall_thru->appargs = strdup(buf1);
 							linkprio(switch_case, fall_thru);
 						} else if (p2->next && p2->next->type == PV_DEFAULT) {
 							fall_thru = new_prio();
 							fall_thru->type = AEL_APPCALL;
 							fall_thru->app = strdup("Goto");
-							snprintf(buf1,sizeof(buf1),"sw-%d-.|1",local_control_statement_count);
+							snprintf(buf1,sizeof(buf1),"sw-%d-.|10",local_control_statement_count);
 							fall_thru->appargs = strdup(buf1);
 							linkprio(switch_case, fall_thru);
 						} else if (!p2->next) {
@@ -3606,7 +3609,9 @@
 	int i;
 	struct ael_priority *pr;
 	do {
-		if (exten->regexten)
+		if (exten->is_switch)
+			i = 10;
+		else if (exten->regexten)
 			i=2;
 		else
 			i=1;

Modified: team/murf/bug_7638/res/res_monitor.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/res/res_monitor.c?view=diff&rev=59142&r1=59141&r2=59142
==============================================================================
--- team/murf/bug_7638/res/res_monitor.c (original)
+++ team/murf/bug_7638/res/res_monitor.c Thu Mar 22 07:19:05 2007
@@ -376,6 +376,7 @@
 		}
 
 		snprintf(chan->monitor->filename_base, FILENAME_MAX, "%s/%s", directory ? "" : ast_config_AST_MONITOR_DIR, fname_base);
+		chan->monitor->filename_changed = 1;
 	} else {
 		ast_log(LOG_WARNING, "Cannot change monitor filename of channel %s to %s, monitoring not started\n", chan->name, fname_base);
 	}

Modified: team/murf/bug_7638/utils/extconf.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug_7638/utils/extconf.c?view=diff&rev=59142&r1=59141&r2=59142
==============================================================================
--- team/murf/bug_7638/utils/extconf.c (original)
+++ team/murf/bug_7638/utils/extconf.c Thu Mar 22 07:19:05 2007
@@ -5865,7 +5865,7 @@
 		if (!ast_context_find(inc->rname)) {
 			res = -1;
 			if (strcasecmp(inc->rname,"parkedcalls")!=0)
-				ast_log(LOG_WARNING, "Context '%s' tries includes nonexistent context '%s'\n",
+				ast_log(LOG_WARNING, "Context '%s' tries to include the nonexistent context '%s'\n",
 						ast_get_context_name(con), inc->rname);
 		}
 	return res;



More information about the svn-commits mailing list