[Asterisk-code-review] res pjproject.c: Replace inlined DEBUG ATLEAST() with macro. (asterisk[13])

Anonymous Coward asteriskteam at digium.com
Wed Jun 22 15:16:19 CDT 2016


Anonymous Coward #1000019 has submitted this change and it was merged.

Change subject: res_pjproject.c: Replace inlined DEBUG_ATLEAST() with macro.
......................................................................


res_pjproject.c: Replace inlined DEBUG_ATLEAST() with macro.

Change-Id: I8799fb0a347ad76e747dafd0eacf1ea1086b9a8c
---
M res/res_pjproject.c
1 file changed, 2 insertions(+), 5 deletions(-)

Approvals:
  Mark Michelson: Looks good to me, approved
  George Joseph: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified



diff --git a/res/res_pjproject.c b/res/res_pjproject.c
index f54c371..08699f3 100644
--- a/res/res_pjproject.c
+++ b/res/res_pjproject.c
@@ -177,7 +177,6 @@
 	const char * log_source = "pjproject";
 	int log_line = 0;
 	const char *log_func = "<?>";
-	int mod_level;
 
 	if (pjproject_log_intercept.fd != -1
 		&& pjproject_log_intercept.thread == pthread_self()) {
@@ -196,10 +195,8 @@
 	}
 
 	if (ast_level == __LOG_DEBUG) {
-		/* For levels 3 and up, obey the debug level for res_pjproject */
-		mod_level = ast_opt_dbg_module ?
-			ast_debug_get_by_module("res_pjproject") : 0;
-		if (option_debug < level && mod_level < level) {
+		/* Obey the debug level for res_pjproject */
+		if (!DEBUG_ATLEAST(level)) {
 			return;
 		}
 	}

-- 
To view, visit https://gerrit.asterisk.org/3062
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8799fb0a347ad76e747dafd0eacf1ea1086b9a8c
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>



More information about the asterisk-code-review mailing list