[asterisk-commits] file: branch group/performance r399738 - in /team/group/performance: apps/ ch...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Sep 24 16:09:30 CDT 2013


Author: file
Date: Tue Sep 24 16:09:28 2013
New Revision: 399738

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=399738
Log:
Stage in more areas to reduce channel snapshotting and publishing.

Modified:
    team/group/performance/apps/app_dial.c
    team/group/performance/channels/chan_sip.c
    team/group/performance/main/bridge.c

Modified: team/group/performance/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/apps/app_dial.c?view=diff&rev=399738&r1=399737&r2=399738
==============================================================================
--- team/group/performance/apps/app_dial.c (original)
+++ team/group/performance/apps/app_dial.c Tue Sep 24 16:09:28 2013
@@ -1958,10 +1958,12 @@
 	time(&end);
 
 	ast_channel_lock(chan);
+	ast_channel_stage_snapshot(chan);
 	snprintf(buf, sizeof(buf), "%d", ast_channel_get_up_time(chan));
 	pbx_builtin_setvar_helper(chan, "ANSWEREDTIME", buf);
 	snprintf(buf, sizeof(buf), "%d", ast_channel_get_duration(chan));
 	pbx_builtin_setvar_helper(chan, "DIALEDTIME", buf);
+	ast_channel_stage_snapshot_done(chan);
 	ast_channel_unlock(chan);
 }
 
@@ -2096,11 +2098,13 @@
 	struct ast_party_caller caller;
 
 	/* Reset all DIAL variables back to blank, to prevent confusion (in case we don't reset all of them). */
+	ast_channel_stage_snapshot(chan);
 	pbx_builtin_setvar_helper(chan, "DIALSTATUS", "");
 	pbx_builtin_setvar_helper(chan, "DIALEDPEERNUMBER", "");
 	pbx_builtin_setvar_helper(chan, "DIALEDPEERNAME", "");
 	pbx_builtin_setvar_helper(chan, "ANSWEREDTIME", "");
 	pbx_builtin_setvar_helper(chan, "DIALEDTIME", "");
+	ast_channel_stage_snapshot_done(chan);
 
 	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "Dial requires an argument (technology/resource)\n");
@@ -2695,6 +2699,7 @@
 			ast_answer(chan);
 
 		strcpy(pa.status, "ANSWER");
+		ast_channel_stage_snapshot(chan);
 		pbx_builtin_setvar_helper(chan, "DIALSTATUS", pa.status);
 		/* Ah ha!  Someone answered within the desired timeframe.  Of course after this
 		   we will always return with -1 so that it is hung up properly after the
@@ -2713,6 +2718,7 @@
 		}
 		ast_channel_unlock(peer);
 		pbx_builtin_setvar_helper(chan, "DIALEDPEERNUMBER", number);
+		ast_channel_stage_snapshot_done(chan);
 
 		if (!ast_strlen_zero(args.url) && ast_channel_supports_html(peer) ) {
 			ast_debug(1, "app_dial: sendurl=%s.\n", args.url);

Modified: team/group/performance/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/channels/chan_sip.c?view=diff&rev=399738&r1=399737&r2=399738
==============================================================================
--- team/group/performance/channels/chan_sip.c (original)
+++ team/group/performance/channels/chan_sip.c Tue Sep 24 16:09:28 2013
@@ -7284,6 +7284,10 @@
 					} while (sip_pvt_trylock(p));
 				}
 
+				if (p->rtp || p->vrtp || p->trtp) {
+					ast_channel_stage_snapshot(oldowner);
+				}
+
 				if (p->rtp) {
 					ast_rtp_instance_set_stats_vars(oldowner, p->rtp);
 				}
@@ -7318,6 +7322,9 @@
 						append_history(p, "RTCPtext", "Quality:%s", quality);
 					}
 					pbx_builtin_setvar_helper(oldowner, "RTPTEXTQOS", quality);
+				}
+				if (p->rtp || p->vrtp || p->trtp) {
+					ast_channel_stage_snapshot_done(oldowner);
 				}
 
 				/* Send a hangup */

Modified: team/group/performance/main/bridge.c
URL: http://svnview.digium.com/svn/asterisk/team/group/performance/main/bridge.c?view=diff&rev=399738&r1=399737&r2=399738
==============================================================================
--- team/group/performance/main/bridge.c (original)
+++ team/group/performance/main/bridge.c Tue Sep 24 16:09:28 2013
@@ -1151,8 +1151,10 @@
 
 static void update_bridge_vars_set(struct ast_channel *chan, const char *name, const char *pvtid)
 {
+	ast_channel_stage_snapshot(chan);
 	pbx_builtin_setvar_helper(chan, "BRIDGEPEER", name);
 	pbx_builtin_setvar_helper(chan, "BRIDGEPVTCALLID", pvtid);
+	ast_channel_stage_snapshot_done(chan);
 }
 
 /*!




More information about the asterisk-commits mailing list