aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorLucian Langa <lucilanga@gnome.org>2010-06-06 00:49:24 +0800
committerLucian Langa <lucilanga@gnome.org>2010-06-06 00:49:24 +0800
commit517023edcb2468e76786511b0ada27025e18caa6 (patch)
treef0828e69f3eaba4710a99e59e8e05932d98059ef /mail
parent25a2437786e43d59b60e6e362eb482afc1b2a77f (diff)
downloadgsoc2013-evolution-517023edcb2468e76786511b0ada27025e18caa6.tar
gsoc2013-evolution-517023edcb2468e76786511b0ada27025e18caa6.tar.gz
gsoc2013-evolution-517023edcb2468e76786511b0ada27025e18caa6.tar.bz2
gsoc2013-evolution-517023edcb2468e76786511b0ada27025e18caa6.tar.lz
gsoc2013-evolution-517023edcb2468e76786511b0ada27025e18caa6.tar.xz
gsoc2013-evolution-517023edcb2468e76786511b0ada27025e18caa6.tar.zst
gsoc2013-evolution-517023edcb2468e76786511b0ada27025e18caa6.zip
Bug 620635 - do not setup proxy if it's not enabled
Diffstat (limited to 'mail')
-rw-r--r--mail/mail-session.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/mail/mail-session.c b/mail/mail-session.c
index d2ab1d8930..c4e1af7294 100644
--- a/mail/mail-session.c
+++ b/mail/mail-session.c
@@ -809,6 +809,7 @@ mail_session_check_junk_notify (GConfClient *gconf, guint id, GConfEntry *entry,
}
#define DIR_PROXY "/system/proxy"
+#define MODE_PROXY "/system/proxy/mode"
#define KEY_SOCKS_HOST "/system/proxy/socks_host"
#define KEY_SOCKS_PORT "/system/proxy/socks_port"
@@ -816,16 +817,19 @@ static void
set_socks_proxy_from_gconf (void)
{
GConfClient *client;
- gchar *host;
+ gchar *mode, *host;
gint port;
client = mail_config_get_gconf_client ();
- host = gconf_client_get_string (client, KEY_SOCKS_HOST, NULL); /* NULL-GError */
- port = gconf_client_get_int (client, KEY_SOCKS_PORT, NULL); /* NULL-GError */
- camel_session_set_socks_proxy (session, host, port);
-
- g_free (host);
+ mode = gconf_client_get_string (client, MODE_PROXY, NULL);
+ if (!strcmp(mode, "manual")) {
+ host = gconf_client_get_string (client, KEY_SOCKS_HOST, NULL); /* NULL-GError */
+ port = gconf_client_get_int (client, KEY_SOCKS_PORT, NULL); /* NULL-GError */
+ camel_session_set_socks_proxy (session, host, port);
+ g_free (host);
+ }
+ g_free (mode);
}
static void