aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_jingle.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-08-16 03:43:47 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-08-16 03:43:47 +0000
commit2dcd94043fe3e8f5ff94751b4105548df48ef8e9 (patch)
tree98c95aea70e10cb294e357dc51f55ae0e3b448aa /channels/chan_jingle.c
parentcf9d8c40b69e7a50f6e4ddef3784ca61e4e64ae6 (diff)
move the calls to ast_jb_configure() to before the PBX thread is started on the
channel to remove the theoretical race condition that the channel could get bridged before the channel's jitterbuffer gets configured. This was pointed out by PCadach on IRC. Thanks! git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39964 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_jingle.c')
-rw-r--r--channels/chan_jingle.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/channels/chan_jingle.c b/channels/chan_jingle.c
index 9bf77cc27..bfa79e454 100644
--- a/channels/chan_jingle.c
+++ b/channels/chan_jingle.c
@@ -813,6 +813,8 @@ static struct ast_channel *jingle_new(struct jingle *client, struct jingle_pvt *
tmp->cid.cid_dnid = ast_strdup(i->exten);
tmp->priority = 1;
ast_setstate(tmp, state);
+ if (i->rtp)
+ ast_jb_configure(tmp, &global_jbconf);
if (state != AST_STATE_DOWN && ast_pbx_start(tmp)) {
ast_log(LOG_WARNING, "Unable to start PBX on %s\n", tmp->name);
tmp->hangupcause = AST_CAUSE_SWITCH_CONGESTION;
@@ -820,10 +822,6 @@ static struct ast_channel *jingle_new(struct jingle *client, struct jingle_pvt *
tmp = NULL;
}
- /* Configure the new channel jb */
- if (tmp && i && i->rtp)
- ast_jb_configure(tmp, &global_jbconf);
-
return tmp;
}