From 109aaa71a5bba641ff7467bc8d61323d99ec7c04 Mon Sep 17 00:00:00 2001 From: Tristan Le Guern Date: Sun, 27 Sep 2015 20:12:06 +0200 Subject: [PATCH] Fix behaviour of libstrophe on signed char arch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The use of 0xff as a separator for libexpat only works on arch where char is defined as an unsigned char. This is an unportable behaviour. Before this patch this is what I experienced: xmpp DEBUG sock_connect to im.bouledef.eu:5222 returned 3 xmpp DEBUG attempting to connect to im.bouledef.eu xmpp DEBUG connection successful conn DEBUG SENT: conn ERROR Server did not open valid stream. xmpp DEBUG Closing socket. DEBUG: disconnected event DEBUG Stopping event loop. xmpp DEBUG RECV: event DEBUG Event loop completed. name = http://etherx.jabber.org/streamsÿstream --- src/parser_expat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/parser_expat.c b/src/parser_expat.c index 639242a..17e680a 100644 --- a/src/parser_expat.c +++ b/src/parser_expat.c @@ -23,8 +23,8 @@ #include "common.h" #include "parser.h" -/* ASCII FF is invalid UTF-8 and should never be present in well-formed XML */ -#define NAMESPACE_SEP ('\xFF') +/* Use the Unit Separator to delimit namespace and name in our XML*/ +#define NAMESPACE_SEP ('\x1F') struct _parser_t { xmpp_ctx_t *ctx;