mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-02 20:08:17 +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:
@@ -815,10 +815,10 @@ static int do_directory(struct ast_channel *chan, struct ast_config *vmcfg, stru
|
||||
/* Sort items */
|
||||
sort_items(sorted, count);
|
||||
|
||||
if (option_debug) {
|
||||
ast_debug(2, "Listing matching entries:\n");
|
||||
if (DEBUG_ATLEAST(2)) {
|
||||
ast_log(LOG_DEBUG, "Listing matching entries:\n");
|
||||
for (ptr = sorted, i = 0; i < count; i++, ptr++) {
|
||||
ast_debug(2, "%s: %s\n", ptr[0]->exten, ptr[0]->name);
|
||||
ast_log(LOG_DEBUG, "%s: %s\n", ptr[0]->exten, ptr[0]->name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user