changeset 29861:417a4e912738

jabber: I never understood why this was in auth.c anyway...
author Paul Aurich <paul@darkrain42.org>
date Sat, 01 May 2010 18:09:16 +0000
parents 3a5194c70b38
children d64a0d8ff36d
files libpurple/protocols/jabber/auth.c libpurple/protocols/jabber/auth.h libpurple/protocols/jabber/jabber.c
diffstat 3 files changed, 29 insertions(+), 30 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/auth.c	Sat May 01 18:03:52 2010 +0000
+++ b/libpurple/protocols/jabber/auth.c	Sat May 01 18:09:16 2010 +0000
@@ -45,35 +45,6 @@
                                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;
--- a/libpurple/protocols/jabber/auth.h	Sat May 01 18:03:52 2010 +0000
+++ b/libpurple/protocols/jabber/auth.h	Sat May 01 18:09:16 2010 +0000
@@ -45,7 +45,6 @@
 	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);
--- a/libpurple/protocols/jabber/jabber.c	Sat May 01 18:03:52 2010 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Sat May 01 18:09:16 2010 +0000
@@ -210,6 +210,35 @@
 	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")) {