mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
These mods are to solve the problem in bug 7506. It's a lot of rework to solve a fairly small problem... such is life.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@47303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -783,11 +783,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;
|
||||
@@ -800,7 +799,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_mutex_lock(&usecnt_lock);
|
||||
usecnt++;
|
||||
ast_mutex_unlock(&usecnt_lock);
|
||||
|
Reference in New Issue
Block a user