From c5da61c1df4bb78e2ae2dc5ec6337c21b3d781df Mon Sep 17 00:00:00 2001 From: Christopher Rienzo Date: Thu, 18 Jun 2009 13:19:31 +0000 Subject: [PATCH] MODUNIMRCP-1 thanks raul git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13833 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c b/src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c index 48d1644af8..a8cdd58f3b 100644 --- a/src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c +++ b/src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c @@ -3422,15 +3422,13 @@ static apt_bool_t unimrcp_log(const char *file, int line, const char *id, apt_lo /* 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;