mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-01 11:32:25 +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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1438,7 +1438,7 @@ static int sendmail(struct minivm_template *template, struct minivm_account *vmu
|
||||
ast_debug(1, "Using default subject for this email \n");
|
||||
}
|
||||
|
||||
if (option_debug > 2)
|
||||
if (DEBUG_ATLEAST(3))
|
||||
fprintf(p, "X-Asterisk-debug: template %s user account %s@%s\n", template->name, vmu->username, vmu->domain);
|
||||
fprintf(p, "MIME-Version: 1.0\n");
|
||||
|
||||
|
||||
@@ -3657,7 +3657,7 @@ static void set_update(MAILSTREAM * stream)
|
||||
char buf[1024] = "";
|
||||
|
||||
if (!(user = get_user_by_mailbox(mailbox, buf, sizeof(buf))) || !(vms = get_vm_state_by_imapuser(user, 0))) {
|
||||
if (user && option_debug > 2)
|
||||
if (user && DEBUG_ATLEAST(3))
|
||||
ast_log(AST_LOG_WARNING, "User %s mailbox not found for update.\n", user);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user