diff libpurple/protocols/jabber/jabber.c @ 29095:da768548fc99

propagate from branch 'im.pidgin.pidgin' (head 2980a8828dae367476dcf5d8e52783fdc137d8bf) to branch 'im.pidgin.cpw.darkrain42.xmpp.scram' (head 9796b72fa5337bb6633b04a951900135c323a2e8)
author Paul Aurich <paul@darkrain42.org>
date Tue, 17 Nov 2009 23:05:18 +0000
parents 923681c5406e fed4286634e7
children d9c70a78fad5
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.c	Tue Nov 17 23:05:13 2009 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Tue Nov 17 23:05:18 2009 +0000
@@ -234,8 +234,8 @@
 		 * an auth feature with namespace http://jabber.org/features/iq-auth
 		 * we should revert back to iq:auth authentication, even though we're
 		 * connecting to an XMPP server.  */
-		js->auth_type = JABBER_AUTH_IQ_AUTH;
 		jabber_stream_set_state(js, JABBER_STREAM_AUTHENTICATING);
+		jabber_auth_start_old(js);
 	}
 }
 
@@ -1502,6 +1502,8 @@
 	purple_circ_buffer_destroy(js->write_buffer);
 	if(js->writeh)
 		purple_input_remove(js->writeh);
+	if (js->auth_mech && js->auth_mech->dispose)
+		js->auth_mech->dispose(js);
 #ifdef HAVE_CYRUS_SASL
 	if(js->sasl)
 		sasl_dispose(&js->sasl);
@@ -1578,11 +1580,6 @@
 		case JABBER_STREAM_AUTHENTICATING:
 			purple_connection_update_progress(js->gc, _("Authenticating"),
 					js->gsc ? 7 : 3, JABBER_CONNECT_STEPS);
-			if(js->protocol_version == JABBER_PROTO_0_9 && js->registration) {
-				jabber_register_start(js);
-			} else if(js->auth_type == JABBER_AUTH_IQ_AUTH) {
-				jabber_auth_start_old(js);
-			}
 			break;
 		case JABBER_STREAM_POST_AUTH:
 			purple_connection_update_progress(js->gc, _("Re-initializing Stream"),
@@ -3514,6 +3511,8 @@
 	jabber_add_feature(JINGLE_TRANSPORT_ICEUDP, 0);
 #endif
 
+	jabber_auth_init();
+
 	/* IPC functions */
 	purple_plugin_ipc_register(plugin, "contact_has_feature", PURPLE_CALLBACK(jabber_ipc_contact_has_feature),
 							 purple_marshal_BOOLEAN__POINTER_POINTER_POINTER,
@@ -3548,6 +3547,7 @@
 {
 	purple_plugin_ipc_unregister_all(plugin);
 
+	jabber_auth_uninit();
 	jabber_features_destroy();
 	jabber_identities_destroy();
 }