aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_chanspy.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-10 15:30:59 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-10 15:30:59 +0000
commit7554f54ea83d348a887dac60775cac0cda9b1396 (patch)
tree01d5ec67b53cac9f9d0ca913019fc14cc5d220fd /apps/app_chanspy.c
parent652ba9ff190198ca5019f095638a5435aff53a40 (diff)
use the channel lock wrappers (issue #7120, Mithraen)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@26528 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_chanspy.c')
-rw-r--r--apps/app_chanspy.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c
index 8c8f5d475..20512f4db 100644
--- a/apps/app_chanspy.c
+++ b/apps/app_chanspy.c
@@ -198,9 +198,9 @@ static int start_spying(struct ast_channel *chan, struct ast_channel *spychan, s
ast_log(LOG_NOTICE, "Attaching %s to %s\n", spychan->name, chan->name);
- ast_mutex_lock(&chan->lock);
+ ast_channel_lock(chan);
res = ast_channel_spy_add(chan, spy);
- ast_mutex_unlock(&chan->lock);
+ ast_channel_unlock(chan);
if (!res && ast_test_flag(chan, AST_FLAG_NBRIDGE) && (peer = ast_bridged_channel(chan))) {
ast_softhangup(peer, AST_SOFTHANGUP_UNBRIDGE);
@@ -219,9 +219,9 @@ static void stop_spying(struct ast_channel *chan, struct ast_channel_spy *spy)
if (!chan)
return;
- ast_mutex_lock(&chan->lock);
+ ast_channel_lock(chan);
ast_channel_spy_remove(chan, spy);
- ast_mutex_unlock(&chan->lock);
+ ast_channel_unlock(chan);
};
/* Map 'volume' levels from -4 through +4 into