diff options
author | Joshua Colp <jcolp@digium.com> | 2013-10-02 16:23:34 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2013-10-02 16:23:34 +0000 |
commit | c1235f2639023a9e450cafcdf8bd35cc304d9e53 (patch) | |
tree | b48cb7bb27925ff48e4f807dda8ee9588fd36031 /channels/chan_gtalk.c | |
parent | 424c0f2eb7ff45a06a21b2d81532ac49e24e8b60 (diff) |
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
Diffstat (limited to 'channels/chan_gtalk.c')
-rw-r--r-- | channels/chan_gtalk.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/channels/chan_gtalk.c b/channels/chan_gtalk.c index fc1b75a53..a44ca57f4 100644 --- a/channels/chan_gtalk.c +++ b/channels/chan_gtalk.c @@ -1149,6 +1149,9 @@ static struct ast_channel *gtalk_new(struct gtalk *client, struct gtalk_pvt *i, ast_log(LOG_WARNING, "Unable to allocate Gtalk channel structure!\n"); return NULL; } + + ast_channel_stage_snapshot(tmp); + ast_channel_tech_set(tmp, >alk_tech); /* Select our native format based on codec preference until we receive @@ -1221,6 +1224,9 @@ static struct ast_channel *gtalk_new(struct gtalk *client, struct gtalk_pvt *i, ast_channel_priority_set(tmp, 1); if (i->rtp) ast_jb_configure(tmp, &global_jbconf); + + ast_channel_stage_snapshot_done(tmp); + if (state != AST_STATE_DOWN && ast_pbx_start(tmp)) { ast_log(LOG_WARNING, "Unable to start PBX on %s\n", ast_channel_name(tmp)); ast_channel_hangupcause_set(tmp, AST_CAUSE_SWITCH_CONGESTION); |