pidgin: 61af5258: jabber: Fix a few places where the defau...

darkrain42 at pidgin.im darkrain42 at pidgin.im
Fri Nov 6 05:00:56 EST 2009


-----------------------------------------------------------------
Revision: 61af525873f086b661ad5276f659a591b6ae98dd
Ancestor: 1bd1634659f0eb9457e31cdc36c935dc6b4c397a
Author: darkrain42 at pidgin.im
Date: 2009-11-06T08:55:36
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/61af525873f086b661ad5276f659a591b6ae98dd

Modified files:
        libpurple/protocols/jabber/auth.c
        libpurple/protocols/jabber/jabber.c
        libpurple/protocols/jabber/jabber.h
        libpurple/protocols/jabber/libxmpp.c

ChangeLog: 

jabber: Fix a few places where the default for require_tls was wrong.

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/auth.c	23b1efa8b388ed08c0e1a5d88ed61aace41b8bff
+++ libpurple/protocols/jabber/auth.c	b078b18e8f791e6b04206a4558b192b9c83f5873
@@ -58,7 +58,7 @@ jabber_process_starttls(JabberStream *js
 				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(js->gc->account, "require_tls", FALSE)) {
+		} else if(purple_account_get_bool(js->gc->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."));
@@ -698,7 +698,7 @@ void jabber_auth_start_old(JabberStream 
 	 * is requiring SSL/TLS, we need to enforce it.
 	 */
 	if (!jabber_stream_is_ssl(js) &&
-			purple_account_get_bool(purple_connection_get_account(js->gc), "require_tls", FALSE)) {
+			purple_account_get_bool(purple_connection_get_account(js->gc), "require_tls", JABBER_DEFAULT_REQUIRE_TLS)) {
 		purple_connection_error_reason(js->gc,
 			PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR,
 			_("You require encryption, but it is not available on this server."));
============================================================
--- libpurple/protocols/jabber/jabber.c	df7f5b3680774b0f3c0af64522eae6ff51363417
+++ libpurple/protocols/jabber/jabber.c	e2bab77cc3d28cbd42ff54d096592091f2bc651d
@@ -200,7 +200,7 @@ void jabber_stream_features_parse(Jabber
 			jabber_stream_set_state(js, JABBER_STREAM_INITIALIZING_ENCRYPTION);
 			return;
 		}
-	} else if(purple_account_get_bool(js->gc->account, "require_tls", FALSE) && !jabber_stream_is_ssl(js)) {
+	} else if(purple_account_get_bool(js->gc->account, "require_tls", JABBER_DEFAULT_REQUIRE_TLS) && !jabber_stream_is_ssl(js)) {
 		purple_connection_error_reason(js->gc,
 			 PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR,
 			_("You require encryption, but it is not available on this server."));
============================================================
--- libpurple/protocols/jabber/jabber.h	2d8f26d7c8eafa62b4ca8ce877f356e82b29abfa
+++ libpurple/protocols/jabber/jabber.h	49c2029895c26dd1351e578abdacac9cef76edbe
@@ -76,6 +76,8 @@ typedef struct _JabberStream JabberStrea
 
 #define CAPS0115_NODE "http://pidgin.im/"
 
+#define JABBER_DEFAULT_REQUIRE_SSL    TRUE
+
 /* Index into attention_types list */
 #define JABBER_BUZZ 0
 
============================================================
--- libpurple/protocols/jabber/libxmpp.c	ceb592bbac49dc7fdf128f9bbf4bc27a4b6971f4
+++ libpurple/protocols/jabber/libxmpp.c	8b915eeb8d40f8ce332d7e9a5af73c665fd0f23e
@@ -355,7 +355,7 @@ init_plugin(PurplePlugin *plugin)
 	purple_account_user_split_set_reverse(split, FALSE);
 	prpl_info.user_splits = g_list_append(prpl_info.user_splits, split);
 
-	option = purple_account_option_bool_new(_("Require SSL/TLS"), "require_tls", TRUE);
+	option = purple_account_option_bool_new(_("Require SSL/TLS"), "require_tls", JABBER_DEFAULT_REQUIRE_TLS);
 	prpl_info.protocol_options = g_list_append(prpl_info.protocol_options,
 											   option);
 


More information about the Commits mailing list