diff libpurple/protocols/jabber/auth.c @ 28447:b357216b7b79

jabber: Fix using BOSH and legacy auth together. Closes #9990. Thanks to Perel for testing.
author Paul Aurich <paul@darkrain42.org>
date Tue, 25 Aug 2009 16:38:18 +0000
parents c585572e80dd
children fa77b70c8ca6
line wrap: on
line diff
--- a/libpurple/protocols/jabber/auth.c	Tue Aug 25 09:37:38 2009 +0000
+++ b/libpurple/protocols/jabber/auth.c	Tue Aug 25 16:38:18 2009 +0000
@@ -575,6 +575,7 @@
                                xmlnode *packet, gpointer data)
 {
 	if (type == JABBER_IQ_RESULT) {
+		jabber_stream_set_state(js, JABBER_STREAM_POST_AUTH);
 		jabber_disco_items_server(js);
 	} else {
 		PurpleConnectionError reason = PURPLE_CONNECTION_ERROR_NETWORK_ERROR;
@@ -1072,7 +1073,12 @@
 	}
 #endif
 
-	jabber_stream_set_state(js, JABBER_STREAM_REINITIALIZING);
+	/*
+	 * The stream will be reinitialized later in jabber_recv_cb_ssl() or
+	 * jabber_bosh_connection_send.
+	 */
+	js->reinit = TRUE;
+	jabber_stream_set_state(js, JABBER_STREAM_POST_AUTH);
 }
 
 void jabber_auth_handle_failure(JabberStream *js, xmlnode *packet)