aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_chanspy.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2009-02-06 16:01:01 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2009-02-06 16:01:01 +0000
commit65fcfaf2b4b295b75738cdd1247aa6519cf76a7c (patch)
tree38965037d24e96e92fba28de033eaaf1b13576bc /apps/app_chanspy.c
parent385db018b450f44778a711f4b90bf7e0394d8c93 (diff)
Merged revisions 173902 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r173902 | file | 2009-02-06 11:59:17 -0400 (Fri, 06 Feb 2009) | 4 lines Always detach and destroy the whisper and barge audiohooks. Additionally also allow an audiohook to be detached if it has not been attached. (closes issue #14414) Reported by: bluecrow76 ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@173904 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_chanspy.c')
-rw-r--r--apps/app_chanspy.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c
index f05a22ac0..7e79eacf0 100644
--- a/apps/app_chanspy.c
+++ b/apps/app_chanspy.c
@@ -495,19 +495,15 @@ static int channel_spy(struct ast_channel *chan, struct chanspy_ds *spyee_chansp
ast_clear_flag(chan, AST_FLAG_END_DTMF_ONLY);
ast_channel_unlock(chan);
- if (ast_test_flag(flags, OPTION_WHISPER)) {
- ast_audiohook_lock(&csth.whisper_audiohook);
- ast_audiohook_detach(&csth.whisper_audiohook);
- ast_audiohook_unlock(&csth.whisper_audiohook);
- ast_audiohook_destroy(&csth.whisper_audiohook);
- }
-
- if (ast_test_flag(flags, OPTION_BARGE)) {
- ast_audiohook_lock(&csth.bridge_whisper_audiohook);
- ast_audiohook_detach(&csth.bridge_whisper_audiohook);
- ast_audiohook_unlock(&csth.bridge_whisper_audiohook);
- ast_audiohook_destroy(&csth.bridge_whisper_audiohook);
- }
+ ast_audiohook_lock(&csth.whisper_audiohook);
+ ast_audiohook_detach(&csth.whisper_audiohook);
+ ast_audiohook_unlock(&csth.whisper_audiohook);
+ ast_audiohook_destroy(&csth.whisper_audiohook);
+
+ ast_audiohook_lock(&csth.bridge_whisper_audiohook);
+ ast_audiohook_detach(&csth.bridge_whisper_audiohook);
+ ast_audiohook_unlock(&csth.bridge_whisper_audiohook);
+ ast_audiohook_destroy(&csth.bridge_whisper_audiohook);
ast_audiohook_lock(&csth.spy_audiohook);
ast_audiohook_detach(&csth.spy_audiohook);