[Freeswitch-svn] [commit] r9179 - freeswitch/trunk/src/mod/loggers/mod_syslog

Freeswitch SVN mikej at freeswitch.org
Sat Jul 26 01:06:25 EDT 2008


Author: mikej
Date: Sat Jul 26 01:06:24 2008
New Revision: 9179

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

Log:
mod_syslog don't log blank lines (FSCORE-163)

Modified: freeswitch/trunk/src/mod/loggers/mod_syslog/mod_syslog.c
==============================================================================
--- freeswitch/trunk/src/mod/loggers/mod_syslog/mod_syslog.c	(original)
+++ freeswitch/trunk/src/mod/loggers/mod_syslog/mod_syslog.c	Sat Jul 26 01:06:24 2008
@@ -98,12 +98,11 @@
 		break;
 	}
 
-	if (!switch_strlen_zero(node->data)) {
+	/* don't log blank lines */
+	if(!switch_strlen_zero(node->data) && (strspn(node->data, " \t\r\n") < strlen(node->data))) {
 		syslog(syslog_level, "%s", node->data);
 	}
 
-
-
 	return SWITCH_STATUS_SUCCESS;
 }
 



More information about the Freeswitch-svn mailing list