Mercurial > pidgin
diff src/protocols/jabber/auth.c @ 8296:dd6fe7d965aa
[gaim-migrate @ 9020]
committing piecemeal sucks, but filetransfer isn't ready for prime time yet. hopefully this doesn't break anything.
this should fix the problems with empty <stream:features/> packets, fix a bug in MUC conferencing, and re-add the option for changing passwords on XMPP servers, until I write the code to actually detect that.
Hopefully this compiles, and I didn't break anything.
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Thu, 19 Feb 2004 14:57:41 +0000 |
parents | 1e145b735b05 |
children | b63debdf5a92 |
line wrap: on
line diff
--- a/src/protocols/jabber/auth.c Thu Feb 19 14:52:09 2004 +0000 +++ b/src/protocols/jabber/auth.c Thu Feb 19 14:57:41 2004 +0000 @@ -32,28 +32,35 @@ #include "util.h" #include "sslconn.h" - -void -jabber_auth_start(JabberStream *js, xmlnode *packet) +gboolean +jabber_process_starttls(JabberStream *js, xmlnode *packet) { - xmlnode *mechs, *mechnode; xmlnode *starttls; - xmlnode *auth; - - gboolean digest_md5 = FALSE, plain=FALSE; if((starttls = xmlnode_get_child(packet, "starttls"))) { if(gaim_account_get_bool(js->gc->account, "use_tls", TRUE) && gaim_ssl_is_supported()) { jabber_send_raw(js, "<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>", -1); - return; + return TRUE; } else if(xmlnode_get_child(starttls, "required")) { gaim_connection_error(js->gc, _("Server requires SSL for login")); - return; + return TRUE; } } + return FALSE; +} + +void +jabber_auth_start(JabberStream *js, xmlnode *packet) +{ + xmlnode *mechs, *mechnode; + xmlnode *auth; + + gboolean digest_md5 = FALSE, plain=FALSE; + + if(js->registration) { jabber_register_start(js); return;