diff options
| author | Michael Biebl <biebl@debian.org> | 2020-04-11 21:30:33 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2020-04-11 21:30:33 +0200 |
| commit | f914c41532a9e4f2bb44be074466b62e4cac8db3 (patch) | |
| tree | 046e8e7a186afecf299cd80d62fa1c93903dbecf /libnm-core/nm-setting-proxy.c | |
| parent | 19e73abd360f0198f94ce49f36ddf009056f6324 (diff) | |
| parent | 1e5977b62f896e844b548c3007ace9e1dfa7f9ed (diff) | |
Update upstream source from tag 'upstream/1.23.90'
Update to upstream version '1.23.90' with Debian dir 38c3873648b51c73a9e448ccb2ac18152c2b3f85
Diffstat (limited to 'libnm-core/nm-setting-proxy.c')
| -rw-r--r-- | libnm-core/nm-setting-proxy.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/libnm-core/nm-setting-proxy.c b/libnm-core/nm-setting-proxy.c index 9e83339c..a81b2d03 100644 --- a/libnm-core/nm-setting-proxy.c +++ b/libnm-core/nm-setting-proxy.c @@ -34,10 +34,10 @@ NM_GOBJECT_PROPERTIES_DEFINE_BASE ( ); typedef struct { - NMSettingProxyMethod method; - gboolean browser_only; char *pac_url; char *pac_script; + int method; + bool browser_only:1; } NMSettingProxyPrivate; G_DEFINE_TYPE (NMSettingProxy, nm_setting_proxy, NM_TYPE_SETTING) @@ -119,11 +119,8 @@ static gboolean verify (NMSetting *setting, NMConnection *connection, GError **error) { NMSettingProxyPrivate *priv = NM_SETTING_PROXY_GET_PRIVATE (setting); - NMSettingProxyMethod method; - method = priv->method; - - if (!NM_IN_SET (method, + if (!NM_IN_SET (priv->method, NM_SETTING_PROXY_METHOD_NONE, NM_SETTING_PROXY_METHOD_AUTO)) { g_set_error (error, @@ -134,7 +131,7 @@ verify (NMSetting *setting, NMConnection *connection, GError **error) return FALSE; } - if (method != NM_SETTING_PROXY_METHOD_AUTO) { + if (priv->method != NM_SETTING_PROXY_METHOD_AUTO) { if (priv->pac_url) { g_set_error (error, NM_CONNECTION_ERROR, @@ -241,8 +238,9 @@ set_property (GObject *object, guint prop_id, /*****************************************************************************/ static void -nm_setting_proxy_init (NMSettingProxy *setting) +nm_setting_proxy_init (NMSettingProxy *self) { + nm_assert (NM_SETTING_PROXY_GET_PRIVATE (self)->method == NM_SETTING_PROXY_METHOD_NONE); } /** @@ -306,7 +304,6 @@ nm_setting_proxy_class_init (NMSettingProxyClass *klass) g_param_spec_int (NM_SETTING_PROXY_METHOD, "", "", G_MININT32, G_MAXINT32, NM_SETTING_PROXY_METHOD_NONE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** |