[gnome-software/gnome-3-20] trivial: Do not attempt to save proxy settings when there are none set



commit 876c44fcc23ce3ff786a6c09357b8f76158c4436
Author: Richard Hughes <richard hughsie com>
Date:   Wed Jul 13 11:29:45 2016 +0100

    trivial: Do not attempt to save proxy settings when there are none set

 src/plugins/gs-plugin-packagekit-proxy.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/gs-plugin-packagekit-proxy.c b/src/plugins/gs-plugin-packagekit-proxy.c
index 466880c..847354a 100644
--- a/src/plugins/gs-plugin-packagekit-proxy.c
+++ b/src/plugins/gs-plugin-packagekit-proxy.c
@@ -152,6 +152,12 @@ reload_proxy_settings (GsPlugin *plugin, GCancellable *cancellable)
        proxy_http = get_proxy_http (plugin);
        proxy_ftp = get_proxy_ftp (plugin);
 
+       /* nothing to do */
+       if (proxy_http == NULL && proxy_ftp == NULL) {
+               g_debug ("not setting proxy as none set");
+               return;
+       }
+
        g_debug ("Setting proxies (http: %s, ftp: %s)", proxy_http, proxy_ftp);
 
        pk_control_set_proxy_async (plugin->priv->control,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]