Mercurial > pidgin.yaz
changeset 8010:c4b5a35c7a12
[gaim-migrate @ 8690]
jabber crashen fixen
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Mon, 05 Jan 2004 17:42:36 +0000 |
parents | fa04c9427837 |
children | 335a54c6fd90 |
files | src/protocols/jabber/chat.c src/protocols/jabber/jabber.c src/protocols/jabber/presence.c src/protocols/jabber/xdata.c |
diffstat | 4 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/jabber/chat.c Mon Jan 05 13:47:20 2004 +0000 +++ b/src/protocols/jabber/chat.c Mon Jan 05 17:42:36 2004 +0000 @@ -309,7 +309,7 @@ for(x = query->child; x; x = x->next) { const char *xmlns; - if(strcmp(x->name, "x")) + if(x->type != NODE_TYPE_TAG || strcmp(x->name, "x")) continue; if(!(xmlns = xmlnode_get_attrib(x, "xmlns"))) @@ -461,7 +461,7 @@ for(x = query->child; x; x = x->next) { const char *xmlns; - if(strcmp(x->name, "x")) + if(x->type != NODE_TYPE_TAG || strcmp(x->name, "x")) continue; if(!(xmlns = xmlnode_get_attrib(x, "xmlns")))
--- a/src/protocols/jabber/jabber.c Mon Jan 05 13:47:20 2004 +0000 +++ b/src/protocols/jabber/jabber.c Mon Jan 05 17:42:36 2004 +0000 @@ -582,7 +582,7 @@ for(x = packet->child; x; x = x->next) { const char *xmlns; - if(strcmp(x->name, "x")) + if(x->type != NODE_TYPE_TAG || strcmp(x->name, "x")) continue; if(!(xmlns = xmlnode_get_attrib(x, "xmlns")))
--- a/src/protocols/jabber/presence.c Mon Jan 05 13:47:20 2004 +0000 +++ b/src/protocols/jabber/presence.c Mon Jan 05 17:42:36 2004 +0000 @@ -316,7 +316,7 @@ for(x = packet->child; x; x = x->next) { const char *xmlns, *nick, *code; xmlnode *stat, *item; - if(strcmp(x->name, "x")) + if(x->type != NODE_TYPE_TAG || strcmp(x->name, "x")) continue; if(!(xmlns = xmlnode_get_attrib(x, "xmlns")) || strcmp(xmlns, "http://jabber.org/protocol/muc#user"))
--- a/src/protocols/jabber/xdata.c Mon Jan 05 13:47:20 2004 +0000 +++ b/src/protocols/jabber/xdata.c Mon Jan 05 17:42:36 2004 +0000 @@ -166,7 +166,7 @@ gaim_request_fields_add_group(fields, group); for(fn = packet->child; fn; fn = fn->next) { - if(fn->name && !strcmp(fn->name, "field")) { + if(fn->type == NODE_TYPE_TAG && !strcmp(fn->name, "field")) { xmlnode *valuenode; const char *type = xmlnode_get_attrib(fn, "type"); const char *label = xmlnode_get_attrib(fn, "label"); @@ -204,7 +204,7 @@ GString *str = g_string_new(""); for(valuenode = fn->child; valuenode; valuenode = valuenode->next) { - if(strcmp(valuenode->name, "value")) + if(valuenode->type != NODE_TYPE_TAG || strcmp(valuenode->name, "value")) continue; if(!(value = xmlnode_get_data(valuenode))) @@ -237,7 +237,7 @@ } for(valuenode = fn->child; valuenode; valuenode = valuenode->next) { - if(strcmp(valuenode->name, "value")) + if(valuenode->type != NODE_TYPE_TAG || strcmp(valuenode->name, "value")) continue; selected = g_list_prepend(selected, xmlnode_get_data(valuenode)); } @@ -245,7 +245,7 @@ for(optnode = fn->child; optnode; optnode = optnode->next) { const char *lbl; - if(strcmp(optnode->name, "option")) + if(optnode->type != NODE_TYPE_TAG || strcmp(optnode->name, "option")) continue; if(!(valuenode = xmlnode_get_child(optnode, "value")))