pidgin: 5c834052: Don't set an attribute prefix on the nod...

qulogic at pidgin.im qulogic at pidgin.im
Mon Feb 16 19:30:38 EST 2009


-----------------------------------------------------------------
Revision: 5c834052e4d753f55797221444e28137a96ea3b9
Ancestor: 410f7adb8bbf7aef2373d653d847556cd17169dc
Author: qulogic at pidgin.im
Date: 2009-02-17T00:27:34
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/5c834052e4d753f55797221444e28137a96ea3b9

Modified files:
        libpurple/protocols/jabber/parser.c

ChangeLog: 

Don't set an attribute prefix on the node, and remove an unnecessary call
to g_strdup. We'll have to add back (real) attribute prefix setting in
2.6.0 when we can add new API.

References #8318.

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/parser.c	c3df562882edc4bc0389b57d0a1049505e8e1a25
+++ libpurple/protocols/jabber/parser.c	194cd0b3cf0a5715df59a06101ccc520d9599a5a
@@ -86,16 +86,11 @@ jabber_parser_element_start_libxml(void 
 			}
 		}
 		for(i=0; i < nb_attributes * 5; i+=5) {
-			const char *prefix = (const char *)attributes[i + 1];
+			const char *attrib_ns = (const char *)attributes[i+2];
 			char *txt;
 			int attrib_len = attributes[i+4] - attributes[i+3];
 			char *attrib = g_malloc(attrib_len + 1);
-			char *attrib_ns = NULL;
 
-			if (attributes[i+2]) {
-				attrib_ns = g_strdup((char*)attributes[i+2]);
-			}
-
 			memcpy(attrib, attributes[i+3], attrib_len);
 			attrib[attrib_len] = '\0';
 
@@ -103,11 +98,7 @@ jabber_parser_element_start_libxml(void 
 			attrib = purple_unescape_html(txt);
 			g_free(txt);
 			xmlnode_set_attrib_with_namespace(node, (const char*) attributes[i], attrib_ns, attrib);
-			if (prefix && *prefix) {
-				node->prefix = g_strdup(prefix);
-			}
 			g_free(attrib);
-			g_free(attrib_ns);
 		}
 
 		js->current = node;


More information about the Commits mailing list