[asterisk-commits] tilghman: trunk r124505 - /trunk/res/res_config_ldap.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Jun 21 07:53:51 CDT 2008


Author: tilghman
Date: Sat Jun 21 07:53:48 2008
New Revision: 124505

URL: http://svn.digium.com/view/asterisk?view=rev&rev=124505
Log:
Reduce warning to debug, otherwise we flood the log when we (legitimately)
can't find a record.
(Closes issue #12908)

Modified:
    trunk/res/res_config_ldap.c

Modified: trunk/res/res_config_ldap.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_config_ldap.c?view=diff&rev=124505&r1=124504&r2=124505
==============================================================================
--- trunk/res/res_config_ldap.c (original)
+++ trunk/res/res_config_ldap.c Sat Jun 21 07:53:48 2008
@@ -588,9 +588,9 @@
 
 				vars = realtime_ldap_result_to_vars(table_config, ldap_result, entries_count_ptr);
 				if (num_entry > 1)
-					ast_log(LOG_WARNING, "More than one entry for dn=%s. Take only 1st one\n", dn);
+					ast_log(LOG_NOTICE, "More than one entry for dn=%s. Take only 1st one\n", dn);
 			} else {
-				ast_log(LOG_WARNING, "Could not find any entry dn=%s.\n", dn);
+				ast_debug(2, "Could not find any entry dn=%s.\n", dn);
 			}
 		}
 		ldap_msgfree(ldap_result);
@@ -816,7 +816,7 @@
 			/* is this a static var or some other? they are handled different for delimited values */
 			vars = realtime_ldap_result_to_vars(table_config, ldap_result, entries_count_ptr);
 		} else {
-			ast_log(LOG_WARNING, "Could not find any entry matching %s in base dn %s.\n",
+			ast_debug(1, "Could not find any entry matching %s in base dn %s.\n",
 				filter->str, clean_basedn);
 		}
 
@@ -942,7 +942,7 @@
 	if (vars) {
 		cfg = ast_config_new();
 		if (!cfg) {
-			ast_log(LOG_WARNING, "Out of memory!\n");
+			ast_log(LOG_ERROR, "Unable to create a config!\n");
 		} else {
 			struct ast_variable **p = vars;
 
@@ -950,7 +950,7 @@
 				struct ast_category *cat = NULL;
 				cat = ast_category_new("", table_name, -1);
 				if (!cat) {
-					ast_log(LOG_WARNING, "Out of memory!\n");
+					ast_log(LOG_ERROR, "Unable to create a new category!\n");
 					break;
 				} else {
 					struct ast_variable *var = *p;
@@ -1022,7 +1022,7 @@
 	struct ast_variable **p;
 
 	if (ast_strlen_zero(file) || !strcasecmp(file, RES_CONFIG_LDAP_CONF)) {
-		ast_log(LOG_WARNING, "Cannot configure myself.\n");
+		ast_log(LOG_ERROR, "Cannot configure myself.\n");
 		return NULL;
 	}
 
@@ -1191,7 +1191,7 @@
 	newval = va_arg(ap, const char *);
 	if (!newparam || !newval) {
 		ast_log(LOG_WARNING,
-				"LINE(%d): need at least one paramter to modify.\n", __LINE__);
+				"LINE(%d): need at least one parameter to modify.\n", __LINE__);
 		return -1;
 	}
 




More information about the asterisk-commits mailing list