comparison libpurple/protocols/jabber/auth.c @ 28662:4b3756ed1053

merged with im.pidgin.pidgin
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Fri, 25 Sep 2009 14:32:16 +0900
parents fa77b70c8ca6
children fa7f3426ed13
comparison
equal deleted inserted replaced
28656:a177a1cdfe4e 28662:4b3756ed1053
690 void jabber_auth_start_old(JabberStream *js) 690 void jabber_auth_start_old(JabberStream *js)
691 { 691 {
692 JabberIq *iq; 692 JabberIq *iq;
693 xmlnode *query, *username; 693 xmlnode *query, *username;
694 694
695 /* We can end up here without encryption if the server doesn't support 695 /*
696 * We can end up here without encryption if the server doesn't support
696 * <stream:features/> and we're not using old-style SSL. If the user 697 * <stream:features/> and we're not using old-style SSL. If the user
697 * is requiring SSL/TLS, we need to enforce it. 698 * is requiring SSL/TLS, we need to enforce it.
698 */ 699 */
699 if (!jabber_stream_is_ssl(js) && 700 if (!jabber_stream_is_ssl(js) &&
700 purple_account_get_bool(purple_connection_get_account(js->gc), "require_tls", FALSE)) { 701 purple_account_get_bool(purple_connection_get_account(js->gc), "require_tls", FALSE)) {
701 purple_connection_error_reason(js->gc, 702 purple_connection_error_reason(js->gc,
702 PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR, 703 PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR,
703 _("You require encryption, but it is not available on this server.")); 704 _("You require encryption, but it is not available on this server."));
704 return; 705 return;
706 }
707
708 /*
709 * IQ Auth doesn't have support for resource binding, so we need to pick a
710 * default resource so it will work properly. jabberd14 throws an error and
711 * iChat server just fails silently.
712 */
713 if (!js->user->resource || *js->user->resource == '\0') {
714 g_free(js->user->resource);
715 js->user->resource = g_strdup("Home");
705 } 716 }
706 717
707 #ifdef HAVE_CYRUS_SASL 718 #ifdef HAVE_CYRUS_SASL
708 /* If we have Cyrus SASL, then passwords will have been set 719 /* If we have Cyrus SASL, then passwords will have been set
709 * to OPTIONAL for this protocol. So, we need to do our own 720 * to OPTIONAL for this protocol. So, we need to do our own