Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
28446:0b3142f3edb4 | 28447:b357216b7b79 |
---|---|
573 static void auth_old_result_cb(JabberStream *js, const char *from, | 573 static void auth_old_result_cb(JabberStream *js, const char *from, |
574 JabberIqType type, const char *id, | 574 JabberIqType type, const char *id, |
575 xmlnode *packet, gpointer data) | 575 xmlnode *packet, gpointer data) |
576 { | 576 { |
577 if (type == JABBER_IQ_RESULT) { | 577 if (type == JABBER_IQ_RESULT) { |
578 jabber_stream_set_state(js, JABBER_STREAM_POST_AUTH); | |
578 jabber_disco_items_server(js); | 579 jabber_disco_items_server(js); |
579 } else { | 580 } else { |
580 PurpleConnectionError reason = PURPLE_CONNECTION_ERROR_NETWORK_ERROR; | 581 PurpleConnectionError reason = PURPLE_CONNECTION_ERROR_NETWORK_ERROR; |
581 char *msg = jabber_parse_error(js, packet, &reason); | 582 char *msg = jabber_parse_error(js, packet, &reason); |
582 xmlnode *error; | 583 xmlnode *error; |
1070 js->sasl_maxbuf = *(int *)x; | 1071 js->sasl_maxbuf = *(int *)x; |
1071 } | 1072 } |
1072 } | 1073 } |
1073 #endif | 1074 #endif |
1074 | 1075 |
1075 jabber_stream_set_state(js, JABBER_STREAM_REINITIALIZING); | 1076 /* |
1077 * The stream will be reinitialized later in jabber_recv_cb_ssl() or | |
1078 * jabber_bosh_connection_send. | |
1079 */ | |
1080 js->reinit = TRUE; | |
1081 jabber_stream_set_state(js, JABBER_STREAM_POST_AUTH); | |
1076 } | 1082 } |
1077 | 1083 |
1078 void jabber_auth_handle_failure(JabberStream *js, xmlnode *packet) | 1084 void jabber_auth_handle_failure(JabberStream *js, xmlnode *packet) |
1079 { | 1085 { |
1080 PurpleConnectionError reason = PURPLE_CONNECTION_ERROR_NETWORK_ERROR; | 1086 PurpleConnectionError reason = PURPLE_CONNECTION_ERROR_NETWORK_ERROR; |