From ae8cc3e18be72c2e074ed33d7cfdc172f8e5f3b1 Mon Sep 17 00:00:00 2001 From: Matt O'Gorman Date: Tue, 3 Oct 2006 15:53:07 +0000 Subject: bug #8076 check option_debug before printing to debug channel. patch provided in bugnote, with minor changes. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44253 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_zapscan.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'apps/app_zapscan.c') 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; } -- cgit v1.2.3