Replace direct checks of option_debug with DEBUG_ATLEAST macro.

Checking option_debug directly is incorrect as it ignores file/module
specific debug settings.  This system-wide change replaces nearly all
direct checks for option_debug with the DEBUG_ATLEAST macro.

Change-Id: Ic342d4799a945dbc40ac085ac142681094a4ebf0
This commit is contained in:
Corey Farrell
2018-03-07 01:29:13 -05:00
parent 7f864dbc36
commit b81eadcefc
16 changed files with 88 additions and 89 deletions

View File

@@ -7424,13 +7424,13 @@ static int ast_add_extension2_lockopt(struct ast_context *con,
ast_add_hint(tmp);
}
}
if (option_debug) {
if (DEBUG_ATLEAST(1)) {
if (tmp->matchcid == AST_EXT_MATCHCID_ON) {
ast_debug(1, "Added extension '%s' priority %d (CID match '%s') to %s (%p)\n",
tmp->name, tmp->priority, tmp->cidmatch_display, con->name, con);
ast_log(LOG_DEBUG, "Added extension '%s' priority %d (CID match '%s') to %s (%p)\n",
tmp->name, tmp->priority, tmp->cidmatch_display, con->name, con);
} else {
ast_debug(1, "Added extension '%s' priority %d to %s (%p)\n",
tmp->name, tmp->priority, con->name, con);
ast_log(LOG_DEBUG, "Added extension '%s' priority %d to %s (%p)\n",
tmp->name, tmp->priority, con->name, con);
}
}