mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-03 12:25:35 +00:00
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:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user