mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user