|
From: <de...@us...> - 2006-09-08 22:47:40
|
Revision: 17194
http://svn.sourceforge.net/gaim/?rev=17194&view=rev
Author: deryni9
Date: 2006-09-08 15:47:36 -0700 (Fri, 08 Sep 2006)
Log Message:
-----------
The signal to noise ratio here isn't very good, but I hate comments that don't
wrap cleanly.
Anyway, apparently libxml2 has intermittent start-parsing errors, so we need
to force it to actually start with this line. Sean pulled it out a bit ago but
that was causing issues with logins just hanging sometimes.
Modified Paths:
--------------
trunk/libgaim/protocols/jabber/parser.c
Modified: trunk/libgaim/protocols/jabber/parser.c
===================================================================
--- trunk/libgaim/protocols/jabber/parser.c 2006-09-08 16:29:52 UTC (rev 17193)
+++ trunk/libgaim/protocols/jabber/parser.c 2006-09-08 22:47:36 UTC (rev 17194)
@@ -156,10 +156,10 @@
void
jabber_parser_setup(JabberStream *js)
{
- /* This seems backwards, but it makes sense. The libxml code creates the parser
- * context when you try to use it (this way, it can figure out the encoding at
- * creation time. So, setting up the parser is just a matter of destroying any
- * current parser. */
+ /* This seems backwards, but it makes sense. The libxml code creates
+ * the parser context when you try to use it (this way, it can figure
+ * out the encoding at creation time. So, setting up the parser is
+ * just a matter of destroying any current parser. */
if (js->context) {
xmlParseChunk(js->context, NULL,0,1);
xmlFreeParserCtxt(js->context);
@@ -171,9 +171,10 @@
void jabber_parser_process(JabberStream *js, const char *buf, int len)
{
if (js->context == NULL) {
- /* libxml inconsistently starts parsing on creating the parser, so so a ParseChunk
- * right afterwards to force it. */
+ /* libxml inconsistently starts parsing on creating the
+ * parser, so do a ParseChunk right afterwards to force it. */
js->context = xmlCreatePushParserCtxt(&jabber_parser_libxml, js, buf, len, NULL);
+ xmlParseChunk(js->context, NULL, 0, 0);
} else if (xmlParseChunk(js->context, buf, len, 0) < 0) {
gaim_connection_error(js->gc, _("XML Parse error"));
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|