mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-17 23:38:23 +00:00
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:
10
main/pbx.c
10
main/pbx.c
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user