diff options
author | Elliott Sales de Andrade <qulogic@pidgin.im> | 2009-02-17 00:27:34 +0000 |
---|---|---|
committer | Elliott Sales de Andrade <qulogic@pidgin.im> | 2009-02-17 00:27:34 +0000 |
commit | 505c4434b3eb30a53c722842b6a1d74c55576964 (patch) | |
tree | a509eab378d0cc9aefd71c77962b477fe2d1ccaa | |
parent | 7386afc6d02cd7b690c9c354bb6b7e3c26cc54f4 (diff) | |
download | pidgin-505c4434b3eb30a53c722842b6a1d74c55576964.tar.gz |
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.
-rw-r--r-- | libpurple/protocols/jabber/parser.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/libpurple/protocols/jabber/parser.c b/libpurple/protocols/jabber/parser.c index 1bbb758f00..4e602768ce 100644 --- a/libpurple/protocols/jabber/parser.c +++ b/libpurple/protocols/jabber/parser.c @@ -86,15 +86,10 @@ jabber_parser_element_start_libxml(void *user_data, } } 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 *user_data, 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; |