diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-12-23 22:29:23 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-12-23 22:29:23 +0000 |
commit | d2f2498ab57eedaa9bc687f261a225fcebedd930 (patch) | |
tree | b18448beacfc578a1dcea4c3acda6e8e1a1366b3 /channels/chan_features.c | |
parent | 8f2fabe64f24fdfd17dcc34773bdb2adb1ef1b7e (diff) |
Small fix for features channel driver
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4549 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_features.c')
-rwxr-xr-x | channels/chan_features.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/chan_features.c b/channels/chan_features.c index 312668804..dae202cf4 100755 --- a/channels/chan_features.c +++ b/channels/chan_features.c @@ -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); |