diff options
author | Mark Spencer <markster@digium.com> | 2004-03-04 01:11:25 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2004-03-04 01:11:25 +0000 |
commit | 806bb3c63f5c3cf8c06692051463120a8321767e (patch) | |
tree | 654f352211e2d0a687b2a6fe94df5f54c3b33d14 /channels/chan_h323.c | |
parent | 534e78b37206b8b61ac8a0af4bc1cd7cc75fcd2b (diff) |
Add support for parking with IAX2
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_h323.c')
-rwxr-xr-x | channels/chan_h323.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/channels/chan_h323.c b/channels/chan_h323.c index 4077ea614..f3a7da406 100755 --- a/channels/chan_h323.c +++ b/channels/chan_h323.c @@ -623,17 +623,19 @@ static int oh323_indicate(struct ast_channel *c, int condition) } // FIXME: WTF is this? Do I need this??? -static int oh323_fixup(struct ast_channel *oldchan, struct ast_channel *newchan) +static int oh323_fixup(struct ast_channel *oldchan, struct ast_channel *newchan, int needlock) { struct oh323_pvt *p = newchan->pvt->pvt; - ast_mutex_lock(&p->lock); + if (needlock) + ast_mutex_lock(&p->lock); if (p->owner != oldchan) { ast_log(LOG_WARNING, "old channel wasn't %p but was %p\n", oldchan, p->owner); return -1; } p->owner = newchan; - ast_mutex_unlock(&p->lock); + if (needlock) + ast_mutex_unlock(&p->lock); return 0; } |