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: https://origsvn.digium.com/svn/asterisk/trunk@69327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2007-06-14 19:39:12 +00:00
parent 60b029aa82
commit 055d82cbce
85 changed files with 1810 additions and 3068 deletions

View File

@@ -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;
}
}