diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-05 14:19:14 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-05 14:19:14 +0000 |
commit | 515eef00ef210e0ff9f7e2c0509e7adb1f4329ee (patch) | |
tree | 59ec5d29dc369ca65c58f2837dffcd645ef43bbd /apps/app_chanspy.c | |
parent | a511f85bc113c49910db9e929c782dc03b339993 (diff) |
Tweak spy locking. (issue #9951 reported by welles)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@73349 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_chanspy.c')
-rw-r--r-- | apps/app_chanspy.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c index 6b30842b8..7510c68e9 100644 --- a/apps/app_chanspy.c +++ b/apps/app_chanspy.c @@ -329,9 +329,10 @@ static int channel_spy(struct ast_channel *chan, struct ast_channel *spyee, int ast_deactivate_generator(chan); + csth.spy.status = CHANSPY_DONE; + ast_mutex_lock(&csth.spy.lock); if (csth.spy.chan) { - csth.spy.status = CHANSPY_DONE; ast_mutex_lock(&csth.spy.chan->lock); ast_channel_spy_remove(csth.spy.chan, &csth.spy); ast_mutex_unlock(&csth.spy.chan->lock); |