aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_chanspy.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-03 20:37:21 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-03 20:37:21 +0000
commit8653f3a16facf696e3fa1de5d5388c4bf209b95a (patch)
treee11f8864d5864b902e008d383431a00d4e85de94 /apps/app_chanspy.c
parent7eeb744249c3a44528122894fe17c096debeb265 (diff)
Thanks to a suggestion from seanbright, print a warning if the attachment
of the whisper or barge audiohooks fails. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@127856 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_chanspy.c')
-rw-r--r--apps/app_chanspy.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c
index fcf015cdd..ca19294df 100644
--- a/apps/app_chanspy.c
+++ b/apps/app_chanspy.c
@@ -361,10 +361,14 @@ static int channel_spy(struct ast_channel *chan, struct chanspy_ds *spyee_chansp
ast_audiohook_init(&csth.whisper_audiohook, AST_AUDIOHOOK_TYPE_WHISPER, "ChanSpy");
ast_audiohook_init(&csth.bridge_whisper_audiohook, AST_AUDIOHOOK_TYPE_WHISPER, "Chanspy");
- start_spying(spyee, spyer_name, &csth.whisper_audiohook); /* Unlocks spyee */
+ if (start_spying(spyee, spyer_name, &csth.whisper_audiohook)) {
+ ast_log(LOG_WARNING, "Unable to attach whisper audiohook to spyee %s. Whisper mode disabled!\n", spyee->name);
+ }
if ((spyee_bridge = ast_bridged_channel(spyee))) {
ast_channel_lock(spyee_bridge);
- start_spying(ast_bridged_channel(spyee), spyer_name, &csth.bridge_whisper_audiohook);
+ if (start_spying(ast_bridged_channel(spyee), spyer_name, &csth.bridge_whisper_audiohook)) {
+ ast_log(LOG_WARNING, "Unable to attach barge audiohook on spyee %s. Barge mode disabled!\n", spyee->name);
+ }
ast_channel_unlock(spyee_bridge);
}
ast_channel_unlock(spyee);