[gnome-software/1001-packagekit-receives-proxy_http-8080-when-proxy-host-is-empty] gs-plugin-packagekit-proxy: Skip the setting when the host is empty
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/1001-packagekit-receives-proxy_http-8080-when-proxy-host-is-empty] gs-plugin-packagekit-proxy: Skip the setting when the host is empty
- Date: Thu, 21 Jan 2021 11:16:41 +0000 (UTC)
commit 2000dd92ab5d2c7cd4d33b2b00d9fe447d7eee94
Author: Milan Crha <mcrha redhat com>
Date: Thu Jan 21 12:14:34 2021 +0100
gs-plugin-packagekit-proxy: Skip the setting when the host is empty
It avoids to set invalid proxy URL to the PackageKit.
Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1001
plugins/packagekit/gs-plugin-packagekit-proxy.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/plugins/packagekit/gs-plugin-packagekit-proxy.c b/plugins/packagekit/gs-plugin-packagekit-proxy.c
index a5bbcc7f..c1a10e8c 100644
--- a/plugins/packagekit/gs-plugin-packagekit-proxy.c
+++ b/plugins/packagekit/gs-plugin-packagekit-proxy.c
@@ -45,7 +45,7 @@ get_proxy_http (GsPlugin *plugin)
return NULL;
host = g_settings_get_string (priv->settings_http, "host");
- if (host == NULL)
+ if (!host || !*host)
return NULL;
port = g_settings_get_int (priv->settings_http, "port");
@@ -88,7 +88,7 @@ get_proxy_https (GsPlugin *plugin)
return NULL;
host = g_settings_get_string (priv->settings_https, "host");
- if (host == NULL)
+ if (!host || !*host)
return NULL;
port = g_settings_get_int (priv->settings_https, "port");
if (port == 0)
@@ -115,7 +115,7 @@ get_proxy_ftp (GsPlugin *plugin)
return NULL;
host = g_settings_get_string (priv->settings_ftp, "host");
- if (host == NULL)
+ if (!host || !*host)
return NULL;
port = g_settings_get_int (priv->settings_ftp, "port");
if (port == 0)
@@ -142,7 +142,7 @@ get_proxy_socks (GsPlugin *plugin)
return NULL;
host = g_settings_get_string (priv->settings_socks, "host");
- if (host == NULL)
+ if (!host || !*host)
return NULL;
port = g_settings_get_int (priv->settings_socks, "port");
if (port == 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]