diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-14 19:39:12 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-14 19:39:12 +0000 |
commit | f0424318479863edeed2a6a128e6d1ac926966e3 (patch) | |
tree | 4fd144260e58c9a66d331fc81b46473723452479 /apps/app_talkdetect.c | |
parent | c8ca7d2f263f5161ce1b29ec2c9de835131fc950 (diff) |
Add a massive set of changes for converting to use the ast_debug() macro.
(issue #9957, patches from mvanbaak, caio1982, critch, and dimas)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@69327 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_talkdetect.c')
-rw-r--r-- | apps/app_talkdetect.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/apps/app_talkdetect.c b/apps/app_talkdetect.c index 7d9376a13..b261d402f 100644 --- a/apps/app_talkdetect.c +++ b/apps/app_talkdetect.c @@ -103,9 +103,7 @@ static int background_detect_exec(struct ast_channel *chan, void *data) } } } - if (option_debug) - ast_log(LOG_DEBUG, "Preparing detect of '%s', sil=%d,min=%d,max=%d\n", - tmp, sil, min, max); + ast_debug(1, "Preparing detect of '%s', sil=%d,min=%d,max=%d\n", tmp, sil, min, max); if (chan->_state != AST_STATE_UP) { /* Otherwise answer unless we're supposed to send this while on-hook */ res = ast_answer(chan); @@ -164,8 +162,7 @@ static int background_detect_exec(struct ast_channel *chan, void *data) ms = 0; if ((ms > min) && ((max < 0) || (ms < max))) { char ms_str[10]; - if (option_debug) - ast_log(LOG_DEBUG, "Found qualified token of %d ms\n", ms); + ast_debug(1, "Found qualified token of %d ms\n", ms); /* Save detected talk time (in milliseconds) */ sprintf(ms_str, "%d", ms ); @@ -176,8 +173,7 @@ static int background_detect_exec(struct ast_channel *chan, void *data) ast_frfree(fr); break; } else { - if (option_debug) - ast_log(LOG_DEBUG, "Found unqualified token of %d ms\n", ms); + ast_debug(1, "Found unqualified token of %d ms\n", ms); } notsilent = 0; } @@ -185,8 +181,7 @@ static int background_detect_exec(struct ast_channel *chan, void *data) if (!notsilent) { /* Heard some audio, mark the begining of the token */ start = ast_tvnow(); - if (option_debug) - ast_log(LOG_DEBUG, "Start of voice token!\n"); + ast_debug(1, "Start of voice token!\n"); notsilent = 1; } } |