aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_zapscan.c
diff options
context:
space:
mode:
authormogorman <mogorman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-03 15:53:07 +0000
committermogorman <mogorman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-03 15:53:07 +0000
commit4a1aaf52ae4189e660ad57ba69253f54603a2beb (patch)
tree27a80e26cf8f6ea1728ab5b2b8cc7573fd9f7cdc /apps/app_zapscan.c
parent1bd1494da59a95dce73628aafc4ba892036b82b2 (diff)
bug #8076 check option_debug before printing to debug channel.
patch provided in bugnote, with minor changes. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@44253 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_zapscan.c')
-rw-r--r--apps/app_zapscan.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/app_zapscan.c b/apps/app_zapscan.c
index 690d9a5cc..86442b890 100644
--- a/apps/app_zapscan.c
+++ b/apps/app_zapscan.c
@@ -179,7 +179,8 @@ static int conf_run(struct ast_channel *chan, int confno, int confflags)
if (ztc.confmode) {
/* Whoa, already in a conference... Retry... */
if (!retryzap) {
- ast_log(LOG_DEBUG, "Zap channel is in a conference already, retrying with pseudo\n");
+ if (option_debug)
+ ast_log(LOG_DEBUG, "Zap channel is in a conference already, retrying with pseudo\n");
retryzap = 1;
goto zapretry;
}
@@ -195,7 +196,8 @@ static int conf_run(struct ast_channel *chan, int confno, int confflags)
close(fd);
goto outrun;
}
- ast_log(LOG_DEBUG, "Placed channel %s in ZAP channel %d monitor\n", chan->name, confno);
+ if (option_debug)
+ ast_log(LOG_DEBUG, "Placed channel %s in ZAP channel %d monitor\n", chan->name, confno);
for(;;) {
outfd = -1;
@@ -207,7 +209,8 @@ static int conf_run(struct ast_channel *chan, int confno, int confflags)
/* Kill old pseudo */
close(fd);
}
- ast_log(LOG_DEBUG, "Ooh, something swapped out under us, starting over\n");
+ if (option_debug)
+ ast_log(LOG_DEBUG, "Ooh, something swapped out under us, starting over\n");
retryzap = 0;
goto zapretry;
}