diff options
author | Mark Spencer <markster@digium.com> | 2004-04-06 22:17:32 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2004-04-06 22:17:32 +0000 |
commit | 13bca43aa8d950e7db8c301a2718a2fe290c401a (patch) | |
tree | f9360f7b870da96fcd47e19ff8c203287e906599 /channels/chan_local.c | |
parent | d0037ea2fde2bf8396ef9bb77892aae9ea86cb86 (diff) |
Get rid of all that old needlock garbage now that we're using recursive mutexes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_local.c')
-rwxr-xr-x | channels/chan_local.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/channels/chan_local.c b/channels/chan_local.c index 0d56ec27a..81ee2e93f 100755 --- a/channels/chan_local.c +++ b/channels/chan_local.c @@ -112,7 +112,7 @@ retrylock: ast_mutex_lock(&p->lock); goto retrylock; } - ast_queue_frame(other, f, 0); + ast_queue_frame(other, f); ast_mutex_unlock(&other->lock); p->glaredetect = 0; return 0; @@ -185,23 +185,20 @@ static int local_write(struct ast_channel *ast, struct ast_frame *f) return res; } -static int local_fixup(struct ast_channel *oldchan, struct ast_channel *newchan, int needlock) +static int local_fixup(struct ast_channel *oldchan, struct ast_channel *newchan) { struct local_pvt *p = newchan->pvt->pvt; - if (needlock) - ast_mutex_lock(&p->lock); + ast_mutex_lock(&p->lock); if ((p->owner != oldchan) && (p->chan != oldchan)) { ast_log(LOG_WARNING, "old channel wasn't %p but was %p/%p\n", oldchan, p->owner, p->chan); - if (needlock) - ast_mutex_unlock(&p->lock); + ast_mutex_unlock(&p->lock); return -1; } if (p->owner == oldchan) p->owner = newchan; else p->chan = newchan; - if (needlock) - ast_mutex_unlock(&p->lock); + ast_mutex_unlock(&p->lock); return 0; } |