proxy: refactor NMProxyConfig to keep internal variables as strv

The API of NMProxyConfig exposes @proxies and @excludes as strv values.
There is no need to track those values internally as a GPtrArray and
then clone them in the getters (especially, since the entire NMProxyConfig
API is internal to core.

Thereby, fix a few memory leaks in add_proxy_config() and some
style fixes for { }.
This commit is contained in:
Thomas Haller
2016-08-19 10:24:59 +02:00
parent 931871995c
commit ac8bf57f1b
4 changed files with 77 additions and 78 deletions

View File

@@ -47,9 +47,9 @@ NMProxyConfigMethod nm_proxy_config_get_method (const NMProxyConfig *config);
void nm_proxy_config_merge_setting (NMProxyConfig *config, NMSettingProxy *setting);
char ** nm_proxy_config_get_proxies (const NMProxyConfig *config);
const char *const*nm_proxy_config_get_proxies (const NMProxyConfig *config);
char ** nm_proxy_config_get_excludes (const NMProxyConfig *config);
const char *const*nm_proxy_config_get_excludes (const NMProxyConfig *config);
gboolean nm_proxy_config_get_browser_only (const NMProxyConfig *config);