Re: [PATCH v3 2/7] src:(proxy): A new Object NMProxyConfig with Proxy Parameters



On Tue, Aug 02, 2016 at 02:01:06AM +0530, Atul Anand wrote:
A new config object NMProxyConfig has been implemented inside core
which contains proxy parameters.

[...]

+             port = 0;
+             tmp = nm_setting_proxy_get_ssl_proxy (setting);
+             port = nm_setting_proxy_get_ssl_port (setting);
+             if (tmp && port)
+                     g_ptr_array_add (priv->proxies, g_strdup_printf ("https://%s:%u/";, tmp, port));
+
+             port = 0;
+             tmp = nm_setting_proxy_get_ftp_proxy (setting);
+             port = nm_setting_proxy_get_ftp_port (setting);
+             if (tmp && port)
+                     g_ptr_array_add (priv->proxies, g_strdup_printf ("ftp://%s:%u/";, tmp, port));
+
+             port = 0;
+             tmp = nm_setting_proxy_get_socks_proxy (setting);
+             port = nm_setting_proxy_get_socks_port (setting);
+             if (tmp && port)
+                     g_ptr_array_add (priv->proxies, g_strdup_printf (nm_setting_proxy_get_socks_version_5 
(setting) ?
+                                                                      "socks5://%s:%u/" : 
"socks4://%s:%u/", tmp, port));

the "port = 0" assignments are not needed.

Beniamino

Attachment: signature.asc
Description: PGP signature



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