mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-03 12:25:35 +00:00
Small fix for features channel driver
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4549 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -381,7 +381,7 @@ static struct ast_channel *features_new(struct feature_pvt *p, int state, int in
|
||||
ast_log(LOG_WARNING, "Called upon channel with no subchan:(\n");
|
||||
return NULL;
|
||||
}
|
||||
if (!p->subs[index].owner) {
|
||||
if (p->subs[index].owner) {
|
||||
ast_log(LOG_WARNING, "Called to put index %d already there!\n", index);
|
||||
return NULL;
|
||||
}
|
||||
@@ -415,6 +415,8 @@ static struct ast_channel *features_new(struct feature_pvt *p, int state, int in
|
||||
tmp->pvt->indicate = features_indicate;
|
||||
tmp->pvt->fixup = features_fixup;
|
||||
p->subs[index].owner = tmp;
|
||||
if (!p->owner)
|
||||
p->owner = tmp;
|
||||
ast_mutex_lock(&usecnt_lock);
|
||||
usecnt++;
|
||||
ast_mutex_unlock(&usecnt_lock);
|
||||
|
||||
Reference in New Issue
Block a user