pidgin: 4c5c5241: jabber: I never understood why this was ...
darkrain42 at pidgin.im
darkrain42 at pidgin.im
Sat May 1 17:45:42 EDT 2010
-----------------------------------------------------------------
Revision: 4c5c524129704ad1119bd51ae362bdb123bdaf75
Ancestor: b5c36c192d12f5a1305d2237a9d294df4bd70da3
Author: darkrain42 at pidgin.im
Date: 2010-05-01T18:09:16
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/4c5c524129704ad1119bd51ae362bdb123bdaf75
Modified files:
libpurple/protocols/jabber/auth.c
libpurple/protocols/jabber/auth.h
libpurple/protocols/jabber/jabber.c
ChangeLog:
jabber: I never understood why this was in auth.c anyway...
-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/auth.c 2b7bba5a3562de2af842c4a4e33b10e41be809bd
+++ libpurple/protocols/jabber/auth.c 61eb7e757b343075c4e984ee7e54da85751ba553
@@ -45,35 +45,6 @@ static void auth_old_result_cb(JabberStr
JabberIqType type, const char *id,
xmlnode *packet, gpointer data);
-gboolean
-jabber_process_starttls(JabberStream *js, xmlnode *packet)
-{
- PurpleAccount *account;
- xmlnode *starttls;
-
- account = purple_connection_get_account(js->gc);
-
- if((starttls = xmlnode_get_child(packet, "starttls"))) {
- if(purple_ssl_is_supported()) {
- jabber_send_raw(js,
- "<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>", -1);
- return TRUE;
- } else if(xmlnode_get_child(starttls, "required")) {
- purple_connection_error_reason(js->gc,
- PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT,
- _("Server requires TLS/SSL, but no TLS/SSL support was found."));
- return TRUE;
- } else if(purple_account_get_bool(account, "require_tls", JABBER_DEFAULT_REQUIRE_TLS)) {
- purple_connection_error_reason(js->gc,
- PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT,
- _("You require encryption, but no TLS/SSL support was found."));
- return TRUE;
- }
- }
-
- return FALSE;
-}
-
static void finish_plaintext_authentication(JabberStream *js)
{
JabberIq *iq;
============================================================
--- libpurple/protocols/jabber/auth.h e2d06037617c6b145092f1545e894630bb79e757
+++ libpurple/protocols/jabber/auth.h 6d90cee7211707669e36c0a25f003c8e0c7c5bc3
@@ -45,7 +45,6 @@ struct _JabberSaslMech {
void (*dispose)(JabberStream *js);
};
-gboolean jabber_process_starttls(JabberStream *js, xmlnode *packet);
void jabber_auth_start(JabberStream *js, xmlnode *packet);
void jabber_auth_start_old(JabberStream *js);
void jabber_auth_handle_challenge(JabberStream *js, xmlnode *packet);
============================================================
--- libpurple/protocols/jabber/jabber.c e237d8edaaa7a57a40967ece1d715f56e76993d3
+++ libpurple/protocols/jabber/jabber.c ae1a7be34b9d204679e0a2490331e12906f72cd6
@@ -210,6 +210,35 @@ static char *jabber_prep_resource(char *
return purple_strreplace(input, "__HOSTNAME__", hostname);
}
+static gboolean
+jabber_process_starttls(JabberStream *js, xmlnode *packet)
+{
+ PurpleAccount *account;
+ xmlnode *starttls;
+
+ account = purple_connection_get_account(js->gc);
+
+ if((starttls = xmlnode_get_child(packet, "starttls"))) {
+ if(purple_ssl_is_supported()) {
+ jabber_send_raw(js,
+ "<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>", -1);
+ return TRUE;
+ } else if(xmlnode_get_child(starttls, "required")) {
+ purple_connection_error_reason(js->gc,
+ PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT,
+ _("Server requires TLS/SSL, but no TLS/SSL support was found."));
+ return TRUE;
+ } else if(purple_account_get_bool(account, "require_tls", JABBER_DEFAULT_REQUIRE_TLS)) {
+ purple_connection_error_reason(js->gc,
+ PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT,
+ _("You require encryption, but no TLS/SSL support was found."));
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+
void jabber_stream_features_parse(JabberStream *js, xmlnode *packet)
{
if(xmlnode_get_child(packet, "starttls")) {
More information about the Commits
mailing list