[Freeswitch-trunk] [commit] r13833 - freeswitch/trunk/src/mod/asr_tts/mod_unimrcp

FreeSWITCH SVN crienzo at freeswitch.org
Thu Jun 18 06:19:32 PDT 2009


Author: crienzo
Date: Thu Jun 18 08:19:31 2009
New Revision: 13833

Log:
MODUNIMRCP-1 thanks raul

Modified:
   freeswitch/trunk/src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c

Modified: freeswitch/trunk/src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c
==============================================================================
--- freeswitch/trunk/src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c	(original)
+++ freeswitch/trunk/src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c	Thu Jun 18 08:19:31 2009
@@ -3422,15 +3422,13 @@
 	
 	/* apr_vsnprintf supports format extensions required by UniMRCP */ 
 	apr_vsnprintf(log_message, sizeof(log_message), format, arg_ptr);
-	if (!switch_strlen_zero(log_message)) {
-		size_t msglen = strlen(log_message);
-		if (msglen >= 2 && log_message[msglen - 2] == '\\' && log_message[msglen - 1] == 'n') {
-			/* log_message already ends in \n */
-			switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, "", line, id, level, "%s", log_message);
-		} else {
-			/* log message needs \n appended */
-			switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, "", line, id, level, "%s\n", log_message);
-		}
+	size_t msglen = strlen(log_message);
+	if (msglen >= 2 && log_message[msglen - 2] == '\\' && log_message[msglen - 1] == 'n') {
+		/* log_message already ends in \n */
+		switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, "", line, id, level, "%s", log_message);
+	} else if (msglen > 0) {
+		/* log message needs \n appended */
+		switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, "", line, id, level, "%s\n", log_message);
 	}
 	
 	return TRUE;



More information about the Freeswitch-trunk mailing list