diff options
author | Corey Farrell <git@cfware.com> | 2018-03-07 15:36:17 -0500 |
---|---|---|
committer | Corey Farrell <git@cfware.com> | 2018-03-07 16:03:01 -0600 |
commit | c8a521b6c804d66abb367783dba75eecb16889a2 (patch) | |
tree | cd017f42216be9712f6b38cacffd8d6a67484844 /apps | |
parent | 9040057db38dbc3d8181a5405d13ed8c8083d438 (diff) |
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
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_directory.c | 6 | ||||
-rw-r--r-- | apps/app_minivm.c | 2 | ||||
-rw-r--r-- | apps/app_voicemail.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/apps/app_directory.c b/apps/app_directory.c index 48533f592..a47fe3b66 100644 --- a/apps/app_directory.c +++ b/apps/app_directory.c @@ -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); } } diff --git a/apps/app_minivm.c b/apps/app_minivm.c index e9fa2118c..c09fba173 100644 --- a/apps/app_minivm.c +++ b/apps/app_minivm.c @@ -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"); diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 72e3e59c1..87f482dce 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -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; } |