[glib-networking/glib-2-36] proxy/gnome: fix automatic mode
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking/glib-2-36] proxy/gnome: fix automatic mode
- Date: Mon, 13 May 2013 21:09:09 +0000 (UTC)
commit 69a6dd0f3e2297880a4bb629675f26d6fc70730f
Author: Dan Winship <danw gnome org>
Date: Mon Apr 22 15:15:48 2013 -0400
proxy/gnome: fix automatic mode
Automatic proxy resolution mode was accidentally getting more-or-less
ignored and treated as "none".
proxy/gnome/gproxyresolvergnome.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/proxy/gnome/gproxyresolvergnome.c b/proxy/gnome/gproxyresolvergnome.c
index d47c6e5..4cdba0a 100644
--- a/proxy/gnome/gproxyresolvergnome.c
+++ b/proxy/gnome/gproxyresolvergnome.c
@@ -225,14 +225,23 @@ update_settings (GProxyResolverGnome *resolver)
resolver->pacrunner = NULL;
}
- if (resolver->mode != G_DESKTOP_PROXY_MODE_MANUAL)
- return;
-
ignore_hosts =
g_settings_get_strv (resolver->proxy_settings, GNOME_PROXY_IGNORE_HOSTS_KEY);
g_simple_proxy_resolver_set_ignore_hosts (simple, ignore_hosts);
g_strfreev (ignore_hosts);
+ if (resolver->mode == G_DESKTOP_PROXY_MODE_AUTO)
+ {
+ /* We use the base_resolver to handle ignore_hosts in the AUTO case,
+ * so we have to set a non-"direct://" default proxy so we can distinguish
+ * the two cases.
+ */
+ g_simple_proxy_resolver_set_default_proxy (simple, "use-proxy:");
+ }
+
+ if (resolver->mode != G_DESKTOP_PROXY_MODE_MANUAL)
+ return;
+
host = g_settings_get_string (resolver->http_settings, GNOME_PROXY_HTTP_HOST_KEY);
port = g_settings_get_int (resolver->http_settings, GNOME_PROXY_HTTP_PORT_KEY);
if (host && *host)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]