[asterisk-commits] file: branch 1.6.1 r163914 - in /branches/1.6.1: ./ apps/app_chanspy.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Dec 12 19:01:25 CST 2008
Author: file
Date: Fri Dec 12 19:01:25 2008
New Revision: 163914
URL: http://svn.digium.com/view/asterisk?view=rev&rev=163914
Log:
Merged revisions 163912 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r163912 | file | 2008-12-12 20:59:24 -0400 (Fri, 12 Dec 2008) | 2 lines
Only detach and destroy the whisper audiohooks if they are actually in use.
........
Modified:
branches/1.6.1/ (props changed)
branches/1.6.1/apps/app_chanspy.c
Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.1/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/apps/app_chanspy.c?view=diff&rev=163914&r1=163913&r2=163914
==============================================================================
--- branches/1.6.1/apps/app_chanspy.c (original)
+++ branches/1.6.1/apps/app_chanspy.c Fri Dec 12 19:01:25 2008
@@ -495,14 +495,19 @@
ast_clear_flag(chan, AST_FLAG_END_DTMF_ONLY);
ast_channel_unlock(chan);
- 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);
+ 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.spy_audiohook);
ast_audiohook_detach(&csth.spy_audiohook);
More information about the asterisk-commits
mailing list