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 /res/res_config_ldap.c | |
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 'res/res_config_ldap.c')
-rw-r--r-- | res/res_config_ldap.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/res/res_config_ldap.c b/res/res_config_ldap.c index 10265c93d..15d9ec018 100644 --- a/res/res_config_ldap.c +++ b/res/res_config_ldap.c @@ -548,11 +548,11 @@ static struct ast_variable **realtime_ldap_result_to_vars(struct ldap_table_conf } /*!< while (ldap_attribute_name) */ ber_free(ber, 0); if (static_table_config == table_config) { - if (option_debug > 2) { + if (DEBUG_ATLEAST(3)) { const struct ast_variable *tmpdebug = variable_named(var, "variable_name"); const struct ast_variable *tmpdebug2 = variable_named(var, "variable_value"); if (tmpdebug && tmpdebug2) { - ast_debug(3, "Added to vars - %s = %s\n", tmpdebug->value, tmpdebug2->value); + ast_log(LOG_DEBUG, "Added to vars - %s = %s\n", tmpdebug->value, tmpdebug2->value); } } vars[entry_index++] = var; @@ -1618,14 +1618,14 @@ static int update2_ldap(const char *basedn, const char *table_name, const struct /* Ready to update */ ast_debug(3, "Modifying %zu matched entries\n", entry_count); - if (option_debug > 2) { + if (DEBUG_ATLEAST(3)) { size_t i; for (i = 0; modifications[i]; i++) { if (modifications[i]->mod_op != LDAP_MOD_DELETE) { - ast_debug(3, "%s => %s\n", modifications[i]->mod_type, - modifications[i]->mod_values[0]); + ast_log(LOG_DEBUG, "%s => %s\n", modifications[i]->mod_type, + modifications[i]->mod_values[0]); } else { - ast_debug(3, "deleting %s\n", modifications[i]->mod_type); + ast_log(LOG_DEBUG, "deleting %s\n", modifications[i]->mod_type); } } } |