pidgin: f08e4f56: Make HTTP proxy detection in the yahoo p...

rekkanoryo at pidgin.im rekkanoryo at pidgin.im
Sun Jun 13 20:10:50 EDT 2010


-----------------------------------------------------------------
Revision: f08e4f567582f7d28683d043f759a720ee9142e3
Ancestor: 1724c0c7cbf56b08b5454e796b80173ec9aef481
Author: rekkanoryo at pidgin.im
Date: 2010-06-14T00:05:55
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/f08e4f567582f7d28683d043f759a720ee9142e3

Modified files:
        libpurple/protocols/yahoo/util.c

ChangeLog: 

Make HTTP proxy detection in the yahoo prpls a bit more robust.  This should
solve some weird proxy related items I couldn't figure out before.  Refs #11986.

-------------- next part --------------
============================================================
--- libpurple/protocols/yahoo/util.c	8b1a626fda1a7464e60bdbb4de4d48c6f4e695e5
+++ libpurple/protocols/yahoo/util.c	bbd849135757fe7f16a2945beae0724771ef0179
@@ -33,10 +33,21 @@ gboolean
 #include <string.h>
 
 gboolean
-yahoo_account_use_http_proxy(PurpleConnection *conn)
+yahoo_account_use_http_proxy(PurpleConnection *pc)
 {
-	PurpleProxyInfo *ppi = purple_proxy_get_setup(conn->account);
-	return (ppi->type == PURPLE_PROXY_HTTP || ppi->type == PURPLE_PROXY_USE_ENVVAR);
+	PurpleAccount *account = purple_connection_get_account(pc);
+	PurpleProxyInfo *ppi = NULL;
+	PurpleProxyType type = PURPLE_PROXY_NONE;
+	gboolean proxy_ssl = purple_account_get_bool(account, "proxy_ssl", FALSE);
+	
+	if(proxy_ssl)
+		ppi = purple_proxy_get_setup(account);
+	else
+		ppi = purple_global_proxy_get_info();
+
+	type = purple_proxy_info_get_type(ppi);
+
+	return (type == PURPLE_PROXY_HTTP || type == PURPLE_PROXY_USE_ENVVAR);
 }
 
 /*


More information about the Commits mailing list