mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-14 16:33:34 +00:00
Minor tweak - we need to lock the channel when we are removing the spy from it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42021 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -370,7 +370,9 @@ static int channel_spy(struct ast_channel *chan, struct ast_channel *spyee, int
|
|||||||
/* If a channel still exists on our spy structure then we need to remove ourselves */
|
/* If a channel still exists on our spy structure then we need to remove ourselves */
|
||||||
if (csth.spy.chan) {
|
if (csth.spy.chan) {
|
||||||
csth.spy.status = CHANSPY_DONE;
|
csth.spy.status = CHANSPY_DONE;
|
||||||
|
ast_channel_lock(csth.spy.chan);
|
||||||
ast_channel_spy_remove(csth.spy.chan, &csth.spy);
|
ast_channel_spy_remove(csth.spy.chan, &csth.spy);
|
||||||
|
ast_channel_unlock(csth.spy.chan);
|
||||||
}
|
}
|
||||||
ast_channel_spy_free(&csth.spy);
|
ast_channel_spy_free(&csth.spy);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user