revert my changes that converted the jb on the channel to be dynamically

allocated. These changes caused crashes when using a channel type that did
not support the jitterbuffer. Instead of fixing why it's crashing, I'm going
to implement this in a better way next week. The way I did it caused a
jitterbuffer to be allocated on every channel where the channel type supported
jitterbuffers, even if they were disabled.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2006-06-23 16:49:12 +00:00
parent b8518110da
commit c8ceb92a4f
12 changed files with 79 additions and 138 deletions

View File

@@ -812,23 +812,19 @@ static struct ast_channel *alsa_new(struct chan_alsa_pvt *p, int state)
ast_string_field_set(tmp, language, language);
p->owner = tmp;
ast_setstate(tmp, state);
if (ast_jb_configure(tmp, &global_jbconf)) {
ast_hangup(tmp);
p->owner = NULL;
return NULL;
}
if (state != AST_STATE_DOWN) {
if (ast_pbx_start(tmp)) {
ast_log(LOG_WARNING, "Unable to start PBX on %s\n", tmp->name);
ast_hangup(tmp);
p->owner = NULL;
return NULL;
}
}
ast_mutex_lock(&usecnt_lock);
usecnt++;
ast_mutex_unlock(&usecnt_lock);
ast_update_use_count();
if (state != AST_STATE_DOWN) {
if (ast_pbx_start(tmp)) {
ast_log(LOG_WARNING, "Unable to start PBX on %s\n", tmp->name);
ast_hangup(tmp);
tmp = NULL;
}
}
if (tmp)
ast_jb_configure(tmp, &global_jbconf);
}
return tmp;
}