Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
28974:1acb11145fa4 | 29095:da768548fc99 |
---|---|
232 } else /* if(xmlnode_get_child_with_namespace(packet, "auth")) */ { | 232 } else /* if(xmlnode_get_child_with_namespace(packet, "auth")) */ { |
233 /* If we get an empty stream:features packet, or we explicitly get | 233 /* If we get an empty stream:features packet, or we explicitly get |
234 * an auth feature with namespace http://jabber.org/features/iq-auth | 234 * an auth feature with namespace http://jabber.org/features/iq-auth |
235 * we should revert back to iq:auth authentication, even though we're | 235 * we should revert back to iq:auth authentication, even though we're |
236 * connecting to an XMPP server. */ | 236 * connecting to an XMPP server. */ |
237 js->auth_type = JABBER_AUTH_IQ_AUTH; | |
238 jabber_stream_set_state(js, JABBER_STREAM_AUTHENTICATING); | 237 jabber_stream_set_state(js, JABBER_STREAM_AUTHENTICATING); |
238 jabber_auth_start_old(js); | |
239 } | 239 } |
240 } | 240 } |
241 | 241 |
242 static void jabber_stream_handle_error(JabberStream *js, xmlnode *packet) | 242 static void jabber_stream_handle_error(JabberStream *js, xmlnode *packet) |
243 { | 243 { |
1500 g_free(js->caps_hash); | 1500 g_free(js->caps_hash); |
1501 | 1501 |
1502 purple_circ_buffer_destroy(js->write_buffer); | 1502 purple_circ_buffer_destroy(js->write_buffer); |
1503 if(js->writeh) | 1503 if(js->writeh) |
1504 purple_input_remove(js->writeh); | 1504 purple_input_remove(js->writeh); |
1505 if (js->auth_mech && js->auth_mech->dispose) | |
1506 js->auth_mech->dispose(js); | |
1505 #ifdef HAVE_CYRUS_SASL | 1507 #ifdef HAVE_CYRUS_SASL |
1506 if(js->sasl) | 1508 if(js->sasl) |
1507 sasl_dispose(&js->sasl); | 1509 sasl_dispose(&js->sasl); |
1508 if(js->sasl_mechs) | 1510 if(js->sasl_mechs) |
1509 g_string_free(js->sasl_mechs, TRUE); | 1511 g_string_free(js->sasl_mechs, TRUE); |
1576 6, JABBER_CONNECT_STEPS); | 1578 6, JABBER_CONNECT_STEPS); |
1577 break; | 1579 break; |
1578 case JABBER_STREAM_AUTHENTICATING: | 1580 case JABBER_STREAM_AUTHENTICATING: |
1579 purple_connection_update_progress(js->gc, _("Authenticating"), | 1581 purple_connection_update_progress(js->gc, _("Authenticating"), |
1580 js->gsc ? 7 : 3, JABBER_CONNECT_STEPS); | 1582 js->gsc ? 7 : 3, JABBER_CONNECT_STEPS); |
1581 if(js->protocol_version == JABBER_PROTO_0_9 && js->registration) { | |
1582 jabber_register_start(js); | |
1583 } else if(js->auth_type == JABBER_AUTH_IQ_AUTH) { | |
1584 jabber_auth_start_old(js); | |
1585 } | |
1586 break; | 1583 break; |
1587 case JABBER_STREAM_POST_AUTH: | 1584 case JABBER_STREAM_POST_AUTH: |
1588 purple_connection_update_progress(js->gc, _("Re-initializing Stream"), | 1585 purple_connection_update_progress(js->gc, _("Re-initializing Stream"), |
1589 (js->gsc ? 8 : 4), JABBER_CONNECT_STEPS); | 1586 (js->gsc ? 8 : 4), JABBER_CONNECT_STEPS); |
1590 | 1587 |
3512 jabber_add_feature(JINGLE_APP_RTP_SUPPORT_VIDEO, jabber_video_enabled); | 3509 jabber_add_feature(JINGLE_APP_RTP_SUPPORT_VIDEO, jabber_video_enabled); |
3513 jabber_add_feature(JINGLE_TRANSPORT_RAWUDP, 0); | 3510 jabber_add_feature(JINGLE_TRANSPORT_RAWUDP, 0); |
3514 jabber_add_feature(JINGLE_TRANSPORT_ICEUDP, 0); | 3511 jabber_add_feature(JINGLE_TRANSPORT_ICEUDP, 0); |
3515 #endif | 3512 #endif |
3516 | 3513 |
3514 jabber_auth_init(); | |
3515 | |
3517 /* IPC functions */ | 3516 /* IPC functions */ |
3518 purple_plugin_ipc_register(plugin, "contact_has_feature", PURPLE_CALLBACK(jabber_ipc_contact_has_feature), | 3517 purple_plugin_ipc_register(plugin, "contact_has_feature", PURPLE_CALLBACK(jabber_ipc_contact_has_feature), |
3519 purple_marshal_BOOLEAN__POINTER_POINTER_POINTER, | 3518 purple_marshal_BOOLEAN__POINTER_POINTER_POINTER, |
3520 purple_value_new(PURPLE_TYPE_BOOLEAN), 3, | 3519 purple_value_new(PURPLE_TYPE_BOOLEAN), 3, |
3521 purple_value_new(PURPLE_TYPE_SUBTYPE, PURPLE_SUBTYPE_ACCOUNT), | 3520 purple_value_new(PURPLE_TYPE_SUBTYPE, PURPLE_SUBTYPE_ACCOUNT), |
3546 void | 3545 void |
3547 jabber_uninit_plugin(PurplePlugin *plugin) | 3546 jabber_uninit_plugin(PurplePlugin *plugin) |
3548 { | 3547 { |
3549 purple_plugin_ipc_unregister_all(plugin); | 3548 purple_plugin_ipc_unregister_all(plugin); |
3550 | 3549 |
3550 jabber_auth_uninit(); | |
3551 jabber_features_destroy(); | 3551 jabber_features_destroy(); |
3552 jabber_identities_destroy(); | 3552 jabber_identities_destroy(); |
3553 } | 3553 } |