From c1235f2639023a9e450cafcdf8bd35cc304d9e53 Mon Sep 17 00:00:00 2001 From: Joshua Colp Date: Wed, 2 Oct 2013 16:23:34 +0000 Subject: Reduce channel snapshot creation and publishing by up to 50%. This change introduces the ability to stage channel snapshot creation and publishing by suppressing the implicit creation and publishing that some functions have. Once all operations are executed the staging is marked as done and a single snapshot is created and published. Review: https://reviewboard.asterisk.org/r/2889/ ........ Merged revisions 400265 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400266 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/dial.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'main/dial.c') diff --git a/main/dial.c b/main/dial.c index 3b720fb9f..6d796e2b9 100644 --- a/main/dial.c +++ b/main/dial.c @@ -286,6 +286,8 @@ static int begin_dial_prerun(struct ast_dial_channel *channel, struct ast_channe cap_request = NULL; cap_all_audio = ast_format_cap_destroy(cap_all_audio); + ast_channel_stage_snapshot(channel->owner); + ast_channel_appl_set(channel->owner, "AppDial2"); ast_channel_data_set(channel->owner, "(Outgoing Line)"); ast_publish_channel_state(channel->owner); @@ -312,6 +314,8 @@ static int begin_dial_prerun(struct ast_dial_channel *channel, struct ast_channe ast_channel_transfercapability_set(channel->owner, ast_channel_transfercapability(chan)); } + ast_channel_stage_snapshot_done(channel->owner); + return 0; } -- cgit v1.2.3