jabber: Use the error code instead of string matching.

Tue, 01 Dec 2009 04:56:47 +0000

author
Paul Aurich <darkrain42@pidgin.im>
date
Tue, 01 Dec 2009 04:56:47 +0000
changeset 29058
48b95d503303
parent 29057
a8de6baeee63
child 29059
8225f2507058
child 29063
f245c5e9e9f3

jabber: Use the error code instead of string matching.

QuLogic pointed out this was more appropriate.

libpurple/protocols/jabber/parser.c file | annotate | diff | comparison | revisions
--- a/libpurple/protocols/jabber/parser.c	Tue Dec 01 02:54:22 2009 +0000
+++ b/libpurple/protocols/jabber/parser.c	Tue Dec 01 04:56:47 2009 +0000
@@ -147,8 +147,7 @@
 		 */
 		return;
 
-	if (error->level == XML_ERR_FATAL && error->message != NULL
-			&& g_str_equal(error->message, "Extra content at the end of the document\n"))
+	if (error->level == XML_ERR_FATAL && error->code == XML_ERR_DOCUMENT_END)
 		/*
 		 * This is probably more annoying than the vcard-temp error; it occurs
 		 * because we disconnect in most cases without waiting for the receiving

mercurial