aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_mixmonitor.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-08 11:30:32 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-08 11:30:32 +0000
commitbb7e5c2fa8b7a4385c5918f0b852b735a31c58c1 (patch)
treef7ae74c4f3f50b0efc8823cf11f5b0d1e4dbe787 /apps/app_mixmonitor.c
parent772c8f151197457fc06a11a00d37932663c6ad48 (diff)
use ast_channel_(un)lock
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@25450 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_mixmonitor.c')
-rw-r--r--apps/app_mixmonitor.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/app_mixmonitor.c b/apps/app_mixmonitor.c
index 99f8850c6..7b16d48e9 100644
--- a/apps/app_mixmonitor.c
+++ b/apps/app_mixmonitor.c
@@ -133,9 +133,9 @@ static void stopmon(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);
}
static int startmon(struct ast_channel *chan, struct ast_channel_spy *spy)
@@ -146,9 +146,9 @@ static int startmon(struct ast_channel *chan, struct ast_channel_spy *spy)
if (!chan)
return -1;
- 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);
@@ -410,9 +410,9 @@ static int stop_mixmonitor_exec(struct ast_channel *chan, void *data)
LOCAL_USER_ADD(u);
- ast_mutex_lock(&chan->lock);
+ ast_channel_lock(chan);
ast_channel_spy_stop_by_type(chan, mixmonitor_spy_type);
- ast_mutex_unlock(&chan->lock);
+ ast_channel_unlock(chan);
LOCAL_USER_REMOVE(u);
@@ -436,7 +436,7 @@ static int mixmonitor_cli(int fd, int argc, char **argv)
else if (!strcasecmp(argv[1], "stop"))
ast_channel_spy_stop_by_type(chan, mixmonitor_spy_type);
- ast_mutex_unlock(&chan->lock);
+ ast_channel_unlock(chan);
return RESULT_SUCCESS;
}