summaryrefslogtreecommitdiff
path: root/src/telepathy-sofiasip.c
diff options
context:
space:
mode:
authorMikhail Zabaluev <mikhail.zabaluev@nokia.com>2010-03-10 18:17:27 +0200
committerMikhail Zabaluev <mikhail.zabaluev@nokia.com>2010-03-10 18:17:27 +0200
commit3476aecbdad44feb2b20562768b572c773194f0d (patch)
treed362c408028e4910e9e5c7d4d8d88ff8e6b6762c /src/telepathy-sofiasip.c
parent703f162d4c6d308a85fd6face49d2b60aa4c5706 (diff)
Strip the trailing newline off the Sofia log messages
Diffstat (limited to 'src/telepathy-sofiasip.c')
-rw-r--r--src/telepathy-sofiasip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/telepathy-sofiasip.c b/src/telepathy-sofiasip.c
index 5ac9c75..7cc453b 100644
--- a/src/telepathy-sofiasip.c
+++ b/src/telepathy-sofiasip.c
@@ -49,9 +49,10 @@ sofia_log_handler (void *logdata, const char *format, va_list args)
/* Append the formatted message at the end of the buffer */
g_string_append_vprintf (buf, format, args);
- /* If we have a terminated line, log it */
+ /* If we have a terminated line, log it, stripping the newline */
if (buf->str[buf->len - 1] == '\n')
{
+ g_string_truncate (buf, buf->len - 1);
tpsip_log (TPSIP_DEBUG_SOFIA, G_LOG_LEVEL_DEBUG, "%s", buf->str);
g_string_truncate (buf, 0);
}