res_pjproject.c: Replace inlined DEBUG_ATLEAST() with macro.
authorRichard Mudgett <rmudgett@digium.com>
Tue, 21 Jun 2016 22:42:28 +0000 (17:42 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Tue, 21 Jun 2016 23:03:48 +0000 (18:03 -0500)
Change-Id: I8799fb0a347ad76e747dafd0eacf1ea1086b9a8c

res/res_pjproject.c

index 9ed3d57..151c996 100644 (file)
@@ -177,7 +177,6 @@ static void log_forwarder(int level, const char *data, int len)
        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 @@ static void log_forwarder(int level, const char *data, int len)
        }
 
        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;
                }
        }