diff src/protocols/jabber/presence.c @ 8135:8f4ce853e685

[gaim-migrate @ 8840] created a convenience function, and used it. a lot. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sat, 17 Jan 2004 19:36:29 +0000
parents 9a6df4d567e0
children e283be34aadf
line wrap: on
line diff
--- a/src/protocols/jabber/presence.c	Sat Jan 17 19:21:39 2004 +0000
+++ b/src/protocols/jabber/presence.c	Sat Jan 17 19:36:29 2004 +0000
@@ -218,7 +218,7 @@
 
 
 	for(y = packet->child; y; y = y->next) {
-		if(y->type != NODE_TYPE_TAG)
+		if(y->type != XMLNODE_TYPE_TAG)
 			continue;
 
 		if(!strcmp(y->name, "status")) {
@@ -315,11 +315,9 @@
 			jabber_buddy_remove_resource(jb, jid->resource);
 			if(chat->muc) {
 				xmlnode *x;
-				for(x = packet->child; x; x = x->next) {
+				for(x = xmlnode_get_child(packet, "x"); x; x = xmlnode_get_next_twin(x)) {
 					const char *xmlns, *nick, *code;
 					xmlnode *stat, *item;
-					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"))
 						continue;