[Freeswitch-svn] [commit] r6518 - freeswitch/trunk/src/mod/loggers/mod_logfile

Freeswitch SVN mikej at freeswitch.org
Wed Dec 5 08:25:33 EST 2007


Author: mikej
Date: Wed Dec  5 08:25:33 2007
New Revision: 6518

Modified:
   freeswitch/trunk/src/mod/loggers/mod_logfile/mod_logfile.c

Log:
always init the levels array.

Modified: freeswitch/trunk/src/mod/loggers/mod_logfile/mod_logfile.c
==============================================================================
--- freeswitch/trunk/src/mod/loggers/mod_logfile/mod_logfile.c	(original)
+++ freeswitch/trunk/src/mod/loggers/mod_logfile/mod_logfile.c	Wed Dec  5 08:25:33 2007
@@ -94,15 +94,6 @@
 	int x, i, argc = 0;
 	char *argv[10] = { 0 };
 
-	profile->levels[0].level = SWITCH_LOG_CONSOLE;
-	profile->levels[1].level = SWITCH_LOG_ALERT;
-	profile->levels[2].level = SWITCH_LOG_CRIT;
-	profile->levels[3].level = SWITCH_LOG_ERROR;
-	profile->levels[4].level = SWITCH_LOG_WARNING;
-	profile->levels[5].level = SWITCH_LOG_NOTICE;
-	profile->levels[6].level = SWITCH_LOG_INFO;
-	profile->levels[7].level = SWITCH_LOG_DEBUG;
-
 	for (i=0; i < (sizeof(profile->levels) / sizeof(struct level_set)); i++) {
 		profile->levels[i].on = 0;
 	}
@@ -269,6 +260,15 @@
 {
 	switch_xml_t param;
 
+	profile->levels[0].level = SWITCH_LOG_CONSOLE;
+	profile->levels[1].level = SWITCH_LOG_ALERT;
+	profile->levels[2].level = SWITCH_LOG_CRIT;
+	profile->levels[3].level = SWITCH_LOG_ERROR;
+	profile->levels[4].level = SWITCH_LOG_WARNING;
+	profile->levels[5].level = SWITCH_LOG_NOTICE;
+	profile->levels[6].level = SWITCH_LOG_INFO;
+	profile->levels[7].level = SWITCH_LOG_DEBUG;
+
 	for (param = switch_xml_child(xml, "param"); param; param = param->next) {
 		char *var = (char *) switch_xml_attr_soft(param, "name");
 		char *val = (char *) switch_xml_attr_soft(param, "value");



More information about the Freeswitch-svn mailing list