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 15:36:17 -05:00
parent 9040057db3
commit c8a521b6c8
16 changed files with 88 additions and 89 deletions

View File

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