Mercurial > pidgin
changeset 25476:b096f7fb6899
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.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Tue, 17 Feb 2009 00:27:34 +0000 |
parents | 463a2caa35e6 |
children | 9398f0f2cdc6 |
files | libpurple/protocols/jabber/parser.c |
diffstat | 1 files changed, 1 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/parser.c Mon Feb 16 05:12:26 2009 +0000 +++ b/libpurple/protocols/jabber/parser.c Tue Feb 17 00:27:34 2009 +0000 @@ -86,15 +86,10 @@ } } 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 @@ 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;