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. |
From: <dat...@us...> - 2006-09-26 00:28:08
|
Revision: 17352 http://svn.sourceforge.net/gaim/?rev=17352&view=rev Author: datallah Date: 2006-09-25 17:28:02 -0700 (Mon, 25 Sep 2006) Log Message: ----------- Avoid allocating, duping and deallocating. Modified Paths: -------------- trunk/libgaim/protocols/jabber/parser.c Modified: trunk/libgaim/protocols/jabber/parser.c =================================================================== --- trunk/libgaim/protocols/jabber/parser.c 2006-09-25 21:14:24 UTC (rev 17351) +++ trunk/libgaim/protocols/jabber/parser.c 2006-09-26 00:28:02 UTC (rev 17352) @@ -51,12 +51,12 @@ if(!strcmp(attributes[i], "version") && !strcmp(attrib, "1.0")) { js->protocol_version = JABBER_PROTO_1_0; + g_free(attrib); } else if(!strcmp(attributes[i], "id")) { if(js->stream_id) g_free(js->stream_id); - js->stream_id = g_strdup(attrib); + js->stream_id = attrib; } - g_free(attrib); } if(js->protocol_version == JABBER_PROTO_0_9) js->auth_type = JABBER_AUTH_IQ_AUTH; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fac...@us...> - 2006-12-02 22:59:07
|
Revision: 17882 http://svn.sourceforge.net/gaim/?rev=17882&view=rev Author: faceprint Date: 2006-12-02 14:58:59 -0800 (Sat, 02 Dec 2006) Log Message: ----------- fix the jabber parser's handling of attributes Modified Paths: -------------- trunk/libgaim/protocols/jabber/parser.c Modified: trunk/libgaim/protocols/jabber/parser.c =================================================================== --- trunk/libgaim/protocols/jabber/parser.c 2006-12-02 22:58:10 UTC (rev 17881) +++ trunk/libgaim/protocols/jabber/parser.c 2006-12-02 22:58:59 UTC (rev 17882) @@ -72,10 +72,14 @@ xmlnode_set_namespace(node, (const char*) namespace); for(i=0; i < nb_attributes * 5; i+=5) { + char *txt; int attrib_len = attributes[i+4] - attributes[i+3]; char *attrib = g_malloc(attrib_len + 1); memcpy(attrib, attributes[i+3], attrib_len); attrib[attrib_len] = '\0'; + txt = attrib; + attrib = gaim_unescape_html(txt); + g_free(txt); xmlnode_set_attrib(node, (const char*) attributes[i], attrib); g_free(attrib); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fac...@us...> - 2006-12-02 23:10:38
|
Revision: 17883 http://svn.sourceforge.net/gaim/?rev=17883&view=rev Author: faceprint Date: 2006-12-02 15:01:02 -0800 (Sat, 02 Dec 2006) Log Message: ----------- compile first, commit second Modified Paths: -------------- trunk/libgaim/protocols/jabber/parser.c Modified: trunk/libgaim/protocols/jabber/parser.c =================================================================== --- trunk/libgaim/protocols/jabber/parser.c 2006-12-02 22:58:59 UTC (rev 17882) +++ trunk/libgaim/protocols/jabber/parser.c 2006-12-02 23:01:02 UTC (rev 17883) @@ -26,6 +26,7 @@ #include "debug.h" #include "jabber.h" #include "parser.h" +#include "util.h" #include "xmlnode.h" static void This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |