A fair number of changes for the sake of bug 7506

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Steve Murphy
2006-11-07 21:47:49 +00:00
parent 7659f6d524
commit 908f176cf3
24 changed files with 266 additions and 173 deletions

View File

@@ -788,11 +788,10 @@ static struct ast_channel *alsa_new(struct chan_alsa_pvt *p, int state)
{
struct ast_channel *tmp = NULL;
if (!(tmp = ast_channel_alloc(1)))
if (!(tmp = ast_channel_alloc(1, state, 0, 0, "ALSA/%s", indevname)))
return NULL;
tmp->tech = &alsa_tech;
ast_string_field_build(tmp, name, "ALSA/%s", indevname);
tmp->fds[0] = readdev;
tmp->nativeformats = AST_FORMAT_SLINEAR;
tmp->readformat = AST_FORMAT_SLINEAR;
@@ -805,7 +804,6 @@ static struct ast_channel *alsa_new(struct chan_alsa_pvt *p, int state)
if (!ast_strlen_zero(language))
ast_string_field_set(tmp, language, language);
p->owner = tmp;
ast_setstate(tmp, state);
ast_jb_configure(tmp, &global_jbconf);
if (state != AST_STATE_DOWN) {
if (ast_pbx_start(tmp)) {