use the channel lock wrappers (issue #7120, Mithraen)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2006-05-10 15:30:59 +00:00
parent e0f0f4b4a4
commit 932c5c7fd7
3 changed files with 11 additions and 11 deletions

View File

@@ -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