summaryrefslogtreecommitdiff
path: root/channels/chan_oss.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2006-08-16 03:43:47 +0000
committerRussell Bryant <russell@russellbryant.com>2006-08-16 03:43:47 +0000
commit9f9a5f19845e38b8829fdff94837b9b760692404 (patch)
tree98c95aea70e10cb294e357dc51f55ae0e3b448aa /channels/chan_oss.c
parentb6a99250edb1acabf6edea5fd0e49a48d630231b (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: https://origsvn.digium.com/svn/asterisk/trunk@39964 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_oss.c')
-rw-r--r--channels/chan_oss.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/channels/chan_oss.c b/channels/chan_oss.c
index 48af9768e..99ad26046 100644
--- a/channels/chan_oss.c
+++ b/channels/chan_oss.c
@@ -1021,6 +1021,7 @@ static struct ast_channel *oss_new(struct chan_oss_pvt *o,
usecnt++;
ast_mutex_unlock(&usecnt_lock);
ast_update_use_count();
+ ast_jb_configure(c, &global_jbconf);
if (state != AST_STATE_DOWN) {
if (ast_pbx_start(c)) {
ast_log(LOG_WARNING, "Unable to start PBX on %s\n", c->name);
@@ -1030,8 +1031,6 @@ static struct ast_channel *oss_new(struct chan_oss_pvt *o,
/* XXX what about usecnt ? */
}
}
- if (c)
- ast_jb_configure(c, &global_jbconf);
return c;
}