[asterisk-commits] res config ldap: Remove extraneous line numbers from log mes... (asterisk[13])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Feb 21 16:34:57 CST 2017
Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/5007 )
Change subject: res_config_ldap: Remove extraneous line numbers from log messages
......................................................................
res_config_ldap: Remove extraneous line numbers from log messages
Extraneous line numbers were being output in many log messages. These
have been removed.
Change-Id: Ice9efa3d252ee87f37fa8f5ea852fda482675431
---
M res/res_config_ldap.c
1 file changed, 18 insertions(+), 18 deletions(-)
Approvals:
Mark Michelson: Looks good to me, approved
Anonymous Coward #1000019: Verified
Joshua Colp: Looks good to me, but someone else must approve
diff --git a/res/res_config_ldap.c b/res/res_config_ldap.c
index 2244677..b004e78 100644
--- a/res/res_config_ldap.c
+++ b/res/res_config_ldap.c
@@ -192,7 +192,7 @@
return 0;
}
- ast_debug(2, "LINE(%d) semicolon_count_var: %s\n", __LINE__, var_value->value);
+ ast_debug(2, "semicolon_count_var: %s\n", var_value->value);
return semicolon_count_str(var_value->value);
}
@@ -332,7 +332,7 @@
for (v = values; *v; v++) {
value = *v;
valptr = value->bv_val;
- ast_debug(2, "LINE(%d) attribute_name: %s LDAP value: %s\n", __LINE__, attribute_name, valptr);
+ ast_debug(2, "attribute_name: %s LDAP value: %s\n", attribute_name, valptr);
if (is_realmed_password_attribute) {
if (!strncasecmp(valptr, "{md5}", 5)) {
valptr += 5;
@@ -469,7 +469,7 @@
delim_value = ast_strdup(valptr);
if ((delim_tot_count = semicolon_count_str(delim_value)) > 0) {
- ast_debug(4, "LINE(%d) is delimited %d times: %s\n", __LINE__, delim_tot_count, delim_value);
+ ast_debug(4, "is delimited %d times: %s\n", delim_tot_count, delim_value);
is_delimited = 1;
}
}
@@ -479,11 +479,11 @@
/* for non-Static RealTime, first */
for (i = pos; !ast_strlen_zero(valptr + i); i++) {
- ast_debug(4, "LINE(%d) DELIM pos: %d i: %d\n", __LINE__, pos, i);
+ ast_debug(4, "DELIM pos: %d i: %d\n", pos, i);
if (delim_value[i] == ';') {
delim_value[i] = '\0';
- ast_debug(2, "LINE(%d) DELIM - attribute_name: %s value: %s pos: %d\n", __LINE__, attribute_name, &delim_value[pos], pos);
+ ast_debug(2, "DELIM - attribute_name: %s value: %s pos: %d\n", attribute_name, &delim_value[pos], pos);
if (prev) {
prev->next = ast_variable_new(attribute_name, &delim_value[pos], table_config->table_name);
@@ -501,9 +501,9 @@
}
}
if (ast_strlen_zero(valptr + i)) {
- ast_debug(4, "LINE(%d) DELIM pos: %d i: %d delim_count: %d\n", __LINE__, pos, i, delim_count);
+ ast_debug(4, "DELIM pos: %d i: %d delim_count: %d\n", pos, i, delim_count);
/* Last delimited value */
- ast_debug(4, "LINE(%d) DELIM - attribute_name: %s value: %s pos: %d\n", __LINE__, attribute_name, &delim_value[pos], pos);
+ ast_debug(4, "DELIM - attribute_name: %s value: %s pos: %d\n", attribute_name, &delim_value[pos], pos);
if (prev) {
prev->next = ast_variable_new(attribute_name, &delim_value[pos], table_config->table_name);
if (prev->next) {
@@ -519,14 +519,14 @@
ast_free(delim_value);
delim_value = NULL;
- ast_debug(4, "LINE(%d) DELIM pos: %d i: %d\n", __LINE__, pos, i);
+ ast_debug(4, "DELIM pos: %d i: %d\n", pos, i);
} else {
/* not delimited */
if (delim_value) {
ast_free(delim_value);
delim_value = NULL;
}
- ast_debug(2, "LINE(%d) attribute_name: %s value: %s\n", __LINE__, attribute_name, valptr);
+ ast_debug(2, "attribute_name: %s value: %s\n", attribute_name, valptr);
if (prev) {
prev->next = ast_variable_new(attribute_name, valptr, table_config->table_name);
@@ -550,7 +550,7 @@
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, "LINE(%d) Added to vars - %s = %s\n", __LINE__, tmpdebug->value, tmpdebug2->value);
+ ast_debug(3, "Added to vars - %s = %s\n", tmpdebug->value, tmpdebug2->value);
}
}
vars[entry_index++] = var;
@@ -561,7 +561,7 @@
} while (delim_count <= delim_tot_count && static_table_config == table_config);
if (static_table_config != table_config) {
- ast_debug(3, "LINE(%d) Added to vars - non static\n", __LINE__);
+ ast_debug(3, "Added to vars - non static\n");
vars[entry_index++] = var;
prev = NULL;
@@ -1246,7 +1246,7 @@
}
if (!attribute || !lookup) {
- ast_log(LOG_WARNING, "LINE(%d): search parameters are empty.\n", __LINE__);
+ ast_log(LOG_WARNING, "Search parameters are empty.\n");
return -1;
}
ast_mutex_lock(&ldap_lock);
@@ -1282,7 +1282,7 @@
* one parameter/value pair and delimit them with a semicolon */
newparam = convert_attribute_name_to_ldap(table_config, field->name);
if (!newparam) {
- ast_log(LOG_WARNING, "LINE(%d): need at least one parameter to modify.\n", __LINE__);
+ ast_log(LOG_WARNING, "Need at least one parameter to modify.\n");
return -1;
}
@@ -1368,12 +1368,12 @@
}
/* Ready to update */
if ((num_entries = ldap_count_entries(ldapConn, ldap_result_msg)) > 0) {
- ast_debug(3, "LINE(%d) Modifying %s=%s hits: %d\n", __LINE__, attribute, lookup, num_entries);
+ ast_debug(3, "Modifying %s=%s hits: %d\n", attribute, lookup, num_entries);
for (i = 0; option_debug > 2 && i < mods_size - 1; i++) {
if (ldap_mods[i]->mod_op != LDAP_MOD_DELETE) {
- ast_debug(3, "LINE(%d) %s=%s \n", __LINE__, ldap_mods[i]->mod_type, ldap_mods[i]->mod_values[0]);
+ ast_debug(3, "%s=%s\n", ldap_mods[i]->mod_type, ldap_mods[i]->mod_values[0]);
} else {
- ast_debug(3, "LINE(%d) deleting %s \n", __LINE__, ldap_mods[i]->mod_type);
+ ast_debug(3, "deleting %s\n", ldap_mods[i]->mod_type);
}
}
ldap_entry = ldap_first_entry(ldapConn, ldap_result_msg);
@@ -1466,7 +1466,7 @@
field = update_fields;
newparam = convert_attribute_name_to_ldap(table_config, field->name);
if (!newparam) {
- ast_log(LOG_WARNING, "LINE(%d): need at least one parameter to modify.\n", __LINE__);
+ ast_log(LOG_WARNING, "Need at least one parameter to modify.\n");
ast_free(filter);
ast_free(clean_basedn);
return -1;
@@ -1546,7 +1546,7 @@
/* Ready to update */
if ((num_entries = ldap_count_entries(ldapConn, ldap_result_msg)) > 0) {
for (i = 0; option_debug > 2 && i < mods_size - 1; i++) {
- ast_debug(3, "LINE(%d) %s=%s \n", __LINE__, ldap_mods[i]->mod_type, ldap_mods[i]->mod_values[0]);
+ ast_debug(3, "%s=%s\n", ldap_mods[i]->mod_type, ldap_mods[i]->mod_values[0]);
}
ldap_entry = ldap_first_entry(ldapConn, ldap_result_msg);
--
To view, visit https://gerrit.asterisk.org/5007
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ice9efa3d252ee87f37fa8f5ea852fda482675431
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
More information about the asterisk-commits
mailing list