changeset 30608:984217629ec9

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.
author John Bailey <rekkanoryo@rekkanoryo.org>
date Mon, 14 Jun 2010 00:05:55 +0000
parents e9001aa49be8
children 670ab0006c61
files libpurple/protocols/yahoo/util.c
diffstat 1 files changed, 14 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/util.c	Sun Jun 13 23:07:24 2010 +0000
+++ b/libpurple/protocols/yahoo/util.c	Mon Jun 14 00:05:55 2010 +0000
@@ -33,10 +33,21 @@
 #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);
 }
 
 /*