Mercurial > pidgin.yaz
diff src/protocols/jabber/auth.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 | 380d2bbdef1a |
children | 1e145b735b05 |
line wrap: on
line diff
--- a/src/protocols/jabber/auth.c Sat Jan 17 19:21:39 2004 +0000 +++ b/src/protocols/jabber/auth.c Sat Jan 17 19:36:29 2004 +0000 @@ -66,16 +66,15 @@ return; } - for(mechnode = mechs->child; mechnode; mechnode = mechnode->next) + for(mechnode = xmlnode_get_child(mechs, "mechanism"); mechnode; + mechnode = xmlnode_get_next_twin(mechnode)) { - if(mechnode->type == NODE_TYPE_TAG) { - char *mech_name = xmlnode_get_data(mechnode); - if(mech_name && !strcmp(mech_name, "DIGEST-MD5")) - digest_md5 = TRUE; - else if(mech_name && !strcmp(mech_name, "PLAIN")) - plain = TRUE; - g_free(mech_name); - } + char *mech_name = xmlnode_get_data(mechnode); + if(mech_name && !strcmp(mech_name, "DIGEST-MD5")) + digest_md5 = TRUE; + else if(mech_name && !strcmp(mech_name, "PLAIN")) + plain = TRUE; + g_free(mech_name); } auth = xmlnode_new("auth");