# HG changeset patch # User Nathan Walp # Date 1073324556 0 # Node ID c4b5a35c7a12268916af216f807b8aba779a410d # Parent fa04c94278379381b38e0a98a22bd78e05e824fc [gaim-migrate @ 8690] jabber crashen fixen committer: Tailor Script diff -r fa04c9427837 -r c4b5a35c7a12 src/protocols/jabber/chat.c --- 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"))) diff -r fa04c9427837 -r c4b5a35c7a12 src/protocols/jabber/jabber.c --- 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"))) diff -r fa04c9427837 -r c4b5a35c7a12 src/protocols/jabber/presence.c --- 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")) diff -r fa04c9427837 -r c4b5a35c7a12 src/protocols/jabber/xdata.c --- 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")))