# HG changeset patch # User Nathan Walp # Date 1078503845 0 # Node ID 66db94ff619c5543e4c878a4c0451e9ce6d4277f # Parent b63debdf5a92cf06ebcd9297426979c42b990d9d [gaim-migrate @ 9127] handle web page registration hints committer: Tailor Script diff -r b63debdf5a92 -r 66db94ff619c src/protocols/jabber/jabber.c --- a/src/protocols/jabber/jabber.c Fri Mar 05 16:14:22 2004 +0000 +++ b/src/protocols/jabber/jabber.c Fri Mar 05 16:24:05 2004 +0000 @@ -605,19 +605,26 @@ return; } - for(x = xmlnode_get_child(packet, "x"); x; x = xmlnode_get_next_twin(x)) { - const char *xmlns; - if(!(xmlns = xmlnode_get_attrib(x, "xmlns"))) - continue; + if((x = xmlnode_get_child_with_namespace(packet, "x", + "jabber:x:data"))) { + jabber_x_data_request(js, x, jabber_register_x_data_cb, NULL); + return; + } else if((x = xmlnode_get_child_with_namespace(packet, "x", + "jabber:x:oob"))) { + xmlnode *url; - if(!strcmp(xmlns, "jabber:x:data")) { - jabber_x_data_request(js, x, jabber_register_x_data_cb, NULL); - return; + if((url = xmlnode_get_child(x, "url"))) { + char *href; + if((href = xmlnode_get_data(url))) { + gaim_notify_uri(NULL, href); + g_free(href); + js->gc->wants_to_die = TRUE; + jabber_connection_schedule_close(js); + return; + } } } - /* XXX: if no jabber:x:data, but jabber:x:oob is there, use that */ - /* as a last resort, use the old jabber:iq:register syntax */ fields = gaim_request_fields_new();