[asterisk-commits] russell: trunk r99924 - in /trunk: ./ apps/app_chanspy.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jan 23 11:48:09 CST 2008
Author: russell
Date: Wed Jan 23 11:48:08 2008
New Revision: 99924
URL: http://svn.digium.com/view/asterisk?view=rev&rev=99924
Log:
Merged revisions 99923 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r99923 | russell | 2008-01-23 11:46:55 -0600 (Wed, 23 Jan 2008) | 8 lines
ChanSpy issues a beep when it starts at the beginning of a list of channels to
potentially spy on. However, if there were no matching channels, it would beep
at you over and over, which is pretty annoying. Now, it will only beep once in
the case that there are no channels to spy on, but it will still beep again once
it reaches the beginning of the channel list again.
(closes issue #11738, patched by me)
........
Modified:
trunk/ (props changed)
trunk/apps/app_chanspy.c
Change Statistics:
0 files changed
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_chanspy.c?view=diff&rev=99924&r1=99923&r2=99924
==============================================================================
--- trunk/apps/app_chanspy.c (original)
+++ trunk/apps/app_chanspy.c Wed Jan 23 11:48:08 2008
@@ -409,6 +409,7 @@
int res;
char *ptr;
int num;
+ int num_spyed_upon = 1;
if (ast_test_flag(flags, OPTION_EXIT)) {
const char *c;
@@ -428,7 +429,7 @@
waitms = 100;
for (;;) {
- if (!ast_test_flag(flags, OPTION_QUIET)) {
+ if (!ast_test_flag(flags, OPTION_QUIET) && num_spyed_upon) {
res = ast_streamfile(chan, "beep", chan->language);
if (!res)
res = ast_waitstream(chan, "");
@@ -465,6 +466,7 @@
/* reset for the next loop around, unless overridden later */
waitms = 100;
peer = prev = next = NULL;
+ num_spyed_upon = 0;
for (peer = next_channel(peer, spec, exten, context);
peer;
@@ -530,7 +532,8 @@
waitms = 5000;
res = channel_spy(chan, peer, &volfactor, fd, flags, exitcontext);
-
+ num_spyed_upon++;
+
if (res == -1) {
goto exit;
} else if (res == -2) {
More information about the asterisk-commits
mailing list