adium-1.4 3548:91f6b5e157f6: Don't use client login for OSCAR ac...

commits at adium.im commits at adium.im
Sat Jun 25 20:36:33 UTC 2011


details:	http://hg.adium.im/adium-1.4/rev/91f6b5e157f6
revision:	3548:91f6b5e157f6
branch:		(none)
author:		Evan Schoenberg
date:		Sat Jun 25 15:34:53 2011 -0500

Don't use client login for OSCAR accounts if a proxy is configured. Worksaround #15137. Fixes #15137.
(transplanted from e071ecbbe9bb3fc7fb755e1deef4dbe2f0e80e3a)

diffs (46 lines):

diff -r aef6880b60d5 -r 91f6b5e157f6 Plugins/Purple Service/CBPurpleAccount.h
--- a/Plugins/Purple Service/CBPurpleAccount.h	Sat Jun 25 15:06:54 2011 -0500
+++ b/Plugins/Purple Service/CBPurpleAccount.h	Sat Jun 25 15:34:53 2011 -0500
@@ -217,4 +217,5 @@
 
 @interface CBPurpleAccount (ForSubclasses)
 - (void)continueConnectWithConfiguredPurpleAccount;
+- (void)continueConnectWithConfiguredProxy;
 @end
diff -r aef6880b60d5 -r 91f6b5e157f6 Plugins/Purple Service/CBPurpleOscarAccount.m
--- a/Plugins/Purple Service/CBPurpleOscarAccount.m	Sat Jun 25 15:06:54 2011 -0500
+++ b/Plugins/Purple Service/CBPurpleOscarAccount.m	Sat Jun 25 15:34:53 2011 -0500
@@ -161,7 +161,7 @@
 																			  group:GROUP_ACCOUNT_STATUS] boolValue]);
 	
 		
-	// Always yes, so SSL on ICQ works again.
+	//Always yes, so SSL on ICQ works again. Note that we'll disable it if we're using a proxy server.
 	purple_account_set_bool(account, "use_clientlogin", TRUE);
 	
 	if ([[self preferenceForKey:PREFERENCE_ENCRYPTION_TYPE group:GROUP_ACCOUNT_STATUS] isEqualToString:PREFERENCE_ENCRYPTION_TYPE_OPPORTUNISTIC]) {
@@ -172,7 +172,23 @@
 		purple_account_set_string(account, "encryption", "no_encryption");
 	}
 }
-	
+
+- (void)continueConnectWithConfiguredProxy
+{
+	PurpleProxyInfo *proxy_info = purple_account_get_proxy_info(account);
+ 
+    if ((purple_proxy_info_get_type(proxy_info) != PURPLE_PROXY_NONE) && 
+        purple_proxy_info_get_host(proxy_info) && strlen(purple_proxy_info_get_host(proxy_info))) {
+        /* Proxy servers and client login don't currently get along.  This should be fixed in libpurple, but until then,
+         * just don't use it.
+         */
+        purple_account_set_bool(account, "use_clientlogin", FALSE);
+    }
+        
+    [super continueConnectWithConfiguredProxy];
+}
+
+
 - (void)migrateSSL
 {
 	// ICQ and AIM should override this




More information about the commits mailing list