[gaim-migrate @ 11866]

Thu, 20 Jan 2005 20:58:25 +0000

author
Stu Tomlinson <nosnilmot@pidgin.im>
date
Thu, 20 Jan 2005 20:58:25 +0000
changeset 10534
c28eef1b882a
parent 10533
4c2ad22fad20
child 10535
f210e92a2454

[gaim-migrate @ 11866]
If you have your proxy set to 'Use Environmental Settings', but don't actually
have any relevant environment variables set, you probably want to connect
directly (as mentioned in bug 1105809). This does just that.

src/proxy.c file | annotate | diff | comparison | revisions
--- a/src/proxy.c	Thu Jan 20 16:37:14 2005 +0000
+++ b/src/proxy.c	Thu Jan 20 20:58:25 2005 +0000
@@ -1563,7 +1563,7 @@
 	if (gaim_proxy_info_get_type(phb->gpi) == GAIM_PROXY_USE_ENVVAR) {
 		if ((tmp = g_getenv("HTTP_PROXY")) != NULL ||
 			(tmp = g_getenv("http_proxy")) != NULL ||
-			(tmp= g_getenv("HTTPPROXY")) != NULL) {
+			(tmp = g_getenv("HTTPPROXY")) != NULL) {
 			char *proxyhost,*proxypath,*proxyuser,*proxypasswd;
 			int proxyport;
 
@@ -1592,6 +1592,10 @@
 
 				gaim_proxy_info_set_port(phb->gpi, proxyport);
 			}
+		} else {
+			/* no proxy environment variable found, don't use a proxy */
+			gaim_debug_info("proxy", "No environment settings found, not using a proxy\n");
+			gaim_proxy_info_set_type(phb->gpi, GAIM_PROXY_NONE);
 		}
 
 		/* XXX: Do we want to skip this step if user/password were part of url? */

mercurial