comparison src/protocols/jabber/jabber.c @ 8398:66db94ff619c

[gaim-migrate @ 9127] handle web page registration hints committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Fri, 05 Mar 2004 16:24:05 +0000
parents 387ba791d5f9
children 681b1661ee8b
comparison
equal deleted inserted replaced
8397:b63debdf5a92 8398:66db94ff619c
603 _("Already Registered"), NULL); 603 _("Already Registered"), NULL);
604 jabber_connection_schedule_close(js); 604 jabber_connection_schedule_close(js);
605 return; 605 return;
606 } 606 }
607 607
608 for(x = xmlnode_get_child(packet, "x"); x; x = xmlnode_get_next_twin(x)) { 608 if((x = xmlnode_get_child_with_namespace(packet, "x",
609 const char *xmlns; 609 "jabber:x:data"))) {
610 if(!(xmlns = xmlnode_get_attrib(x, "xmlns"))) 610 jabber_x_data_request(js, x, jabber_register_x_data_cb, NULL);
611 continue; 611 return;
612 612 } else if((x = xmlnode_get_child_with_namespace(packet, "x",
613 if(!strcmp(xmlns, "jabber:x:data")) { 613 "jabber:x:oob"))) {
614 jabber_x_data_request(js, x, jabber_register_x_data_cb, NULL); 614 xmlnode *url;
615 return; 615
616 if((url = xmlnode_get_child(x, "url"))) {
617 char *href;
618 if((href = xmlnode_get_data(url))) {
619 gaim_notify_uri(NULL, href);
620 g_free(href);
621 js->gc->wants_to_die = TRUE;
622 jabber_connection_schedule_close(js);
623 return;
624 }
616 } 625 }
617 } 626 }
618
619 /* XXX: if no jabber:x:data, but jabber:x:oob is there, use that */
620 627
621 /* as a last resort, use the old jabber:iq:register syntax */ 628 /* as a last resort, use the old jabber:iq:register syntax */
622 629
623 fields = gaim_request_fields_new(); 630 fields = gaim_request_fields_new();
624 group = gaim_request_field_group_new(NULL); 631 group = gaim_request_field_group_new(NULL);