From c94db7399993f1261e4b45e94ed407ade8e95a8b Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Fri, 30 Sep 2011 16:39:38 +0100 Subject: [PATCH] parse_message_body: clean up empty body special case https://bugs.freedesktop.org/show_bug.cgi?id=41364 --- gabble/message-channel.c | 4 ++-- salut/message-channel.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gabble/message-channel.c b/gabble/message-channel.c index f72eddc..d628fe7 100644 --- a/gabble/message-channel.c +++ b/gabble/message-channel.c @@ -273,8 +273,8 @@ parse_message_body (const gchar *body, WockyNode *node; GError *err = NULL; - if (body == NULL || *body == '\0') - body = ""; + if (tp_str_empty (body)) + return wocky_node_tree_new ("message", YTST_MESSAGE_NS, NULL); reader = wocky_xmpp_reader_new_no_stream (); wocky_xmpp_reader_push (reader, (guint8 *) body, strlen (body)); diff --git a/salut/message-channel.c b/salut/message-channel.c index 76f99e1..da4fe55 100644 --- a/salut/message-channel.c +++ b/salut/message-channel.c @@ -272,8 +272,8 @@ parse_message_body (const gchar *body, WockyNode *node; GError *err = NULL; - if (body == NULL || *body == '\0') - body = ""; + if (tp_str_empty (body)) + return wocky_node_tree_new ("message", YTST_MESSAGE_NS, NULL); reader = wocky_xmpp_reader_new_no_stream (); wocky_xmpp_reader_push (reader, (guint8 *) body, strlen (body)); -- 1.7.5.4