diff options
author | Thomas Haller <thaller@redhat.com> | 2019-12-12 11:52:11 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-12-24 07:47:50 +0100 |
commit | 1cab6367b2c4a509689bf2009719b2fcdb836c04 (patch) | |
tree | 69562bdb3228ce588cd09f01edee98864a556a89 /libnm-core | |
parent | 0de6cd2d68a8351d7fc1ee3b90f719407fd06b3d (diff) | |
download | NetworkManager-1cab6367b2c4a509689bf2009719b2fcdb836c04.tar.gz |
libnm: don't have G_PARAM_CONSTRUCT properties in NMSetting instances
G_PARAM_CONSTRUCT cause to explicitly initialize the property during
object construction. This is an unnecessary overhead that we can easily
avoid.
The overhead is because G_PARAM_CONSTRUCT parameters are always set with
g_object_set() before calling constructed(). Even if they are not specified
during g_object_new(), in which case it calls set with the property's default
value. This also requires g_object_new() to iterate all properties to
find and sort the construct properties.
NMSetting are supposed to be simple classes. They don't need to have
their properties initialized before object construction completes.
Especially if the default values are NULL or zero, in which case there
is nothing to do. If the default value is not NULL or zero, we need
to initialize the field instead in the nm_setting*_init() function.
Diffstat (limited to 'libnm-core')
32 files changed, 116 insertions, 167 deletions
diff --git a/libnm-core/nm-core-internal.h b/libnm-core/nm-core-internal.h index 1e5ee63790..95cfc47f3d 100644 --- a/libnm-core/nm-core-internal.h +++ b/libnm-core/nm-core-internal.h @@ -94,6 +94,7 @@ #define NM_BR_PORT_DEF_PRIORITY 32 #define NM_BR_PORT_MAX_PATH_COST 65535 +#define NM_BR_PORT_DEF_PATH_COST 100 /* NM_SETTING_COMPARE_FLAG_INFERRABLE: check whether a device-generated * connection can be replaced by a already-defined connection. This flag only diff --git a/libnm-core/nm-setting-6lowpan.c b/libnm-core/nm-setting-6lowpan.c index d6aa597853..a25910eaf2 100644 --- a/libnm-core/nm-setting-6lowpan.c +++ b/libnm-core/nm-setting-6lowpan.c @@ -214,7 +214,6 @@ nm_setting_6lowpan_class_init (NMSetting6LowpanClass *klass) g_param_spec_string (NM_SETTING_6LOWPAN_PARENT, "", "", NULL, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); diff --git a/libnm-core/nm-setting-8021x.c b/libnm-core/nm-setting-8021x.c index d31410753d..3a309c9ebd 100644 --- a/libnm-core/nm-setting-8021x.c +++ b/libnm-core/nm-setting-8021x.c @@ -3828,7 +3828,6 @@ nm_setting_802_1x_class_init (NMSetting8021xClass *klass) obj_properties[PROP_PHASE1_AUTH_FLAGS] = g_param_spec_uint (NM_SETTING_802_1X_PHASE1_AUTH_FLAGS, "", "", 0, G_MAXUINT32, NM_SETTING_802_1X_AUTH_FLAGS_NONE, - G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); @@ -4401,7 +4400,6 @@ nm_setting_802_1x_class_init (NMSetting8021xClass *klass) g_param_spec_boolean (NM_SETTING_802_1X_SYSTEM_CA_CERTS, "", "", FALSE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** diff --git a/libnm-core/nm-setting-bridge-port.c b/libnm-core/nm-setting-bridge-port.c index 03e6280a75..5fcf1e6027 100644 --- a/libnm-core/nm-setting-bridge-port.c +++ b/libnm-core/nm-setting-bridge-port.c @@ -439,6 +439,9 @@ nm_setting_bridge_port_init (NMSettingBridgePort *setting) NMSettingBridgePortPrivate *priv = NM_SETTING_BRIDGE_PORT_GET_PRIVATE (setting); priv->vlans = g_ptr_array_new_with_free_func ((GDestroyNotify) nm_bridge_vlan_unref); + + priv->priority = NM_BR_PORT_DEF_PRIORITY; + priv->path_cost = NM_BR_PORT_DEF_PATH_COST; } /** @@ -497,7 +500,6 @@ nm_setting_bridge_port_class_init (NMSettingBridgePortClass *klass) g_param_spec_uint (NM_SETTING_BRIDGE_PORT_PRIORITY, "", "", 0, NM_BR_PORT_MAX_PRIORITY, NM_BR_PORT_DEF_PRIORITY, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -517,9 +519,8 @@ nm_setting_bridge_port_class_init (NMSettingBridgePortClass *klass) */ obj_properties[PROP_PATH_COST] = g_param_spec_uint (NM_SETTING_BRIDGE_PORT_PATH_COST, "", "", - 0, NM_BR_PORT_MAX_PATH_COST, 100, + 0, NM_BR_PORT_MAX_PATH_COST, NM_BR_PORT_DEF_PATH_COST, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** diff --git a/libnm-core/nm-setting-bridge.c b/libnm-core/nm-setting-bridge.c index 2222244491..46d584aef1 100644 --- a/libnm-core/nm-setting-bridge.c +++ b/libnm-core/nm-setting-bridge.c @@ -22,6 +22,15 @@ * necessary for bridging connections. **/ +#define BRIDGE_AGEING_TIME_DEFAULT 300 +#define BRIDGE_FORWARD_DELAY_DEFAULT 15 +#define BRIDGE_HELLO_TIME_DEFAULT 2 +#define BRIDGE_MAX_AGE_DEFAULT 20 +#define BRIDGE_MULTICAST_SNOOPING_DEFAULT TRUE +#define BRIDGE_PRIORITY_DEFAULT 0x8000 +#define BRIDGE_STP_DEFAULT TRUE +#define BRIDGE_VLAN_DEFAULT_PVID_DEFAULT 1 + /*****************************************************************************/ NM_GOBJECT_PROPERTIES_DEFINE (NMSettingBridge, @@ -1131,6 +1140,15 @@ nm_setting_bridge_init (NMSettingBridge *setting) NMSettingBridgePrivate *priv = NM_SETTING_BRIDGE_GET_PRIVATE (setting); priv->vlans = g_ptr_array_new_with_free_func ((GDestroyNotify) nm_bridge_vlan_unref); + + priv->ageing_time = BRIDGE_AGEING_TIME_DEFAULT; + priv->forward_delay = BRIDGE_FORWARD_DELAY_DEFAULT; + priv->hello_time = BRIDGE_HELLO_TIME_DEFAULT; + priv->max_age = BRIDGE_MAX_AGE_DEFAULT; + priv->multicast_snooping = BRIDGE_MULTICAST_SNOOPING_DEFAULT; + priv->priority = BRIDGE_PRIORITY_DEFAULT; + priv->stp = BRIDGE_STP_DEFAULT; + priv->vlan_default_pvid = BRIDGE_VLAN_DEFAULT_PVID_DEFAULT; } /** @@ -1225,9 +1243,8 @@ nm_setting_bridge_class_init (NMSettingBridgeClass *klass) */ obj_properties[PROP_STP] = g_param_spec_boolean (NM_SETTING_BRIDGE_STP, "", "", - TRUE, + BRIDGE_STP_DEFAULT, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -1248,9 +1265,8 @@ nm_setting_bridge_class_init (NMSettingBridgeClass *klass) */ obj_properties[PROP_PRIORITY] = g_param_spec_uint (NM_SETTING_BRIDGE_PRIORITY, "", "", - 0, G_MAXUINT16, 0x8000, + 0, G_MAXUINT16, BRIDGE_PRIORITY_DEFAULT, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -1269,9 +1285,8 @@ nm_setting_bridge_class_init (NMSettingBridgeClass *klass) */ obj_properties[PROP_FORWARD_DELAY] = g_param_spec_uint (NM_SETTING_BRIDGE_FORWARD_DELAY, "", "", - 0, NM_BR_MAX_FORWARD_DELAY, 15, + 0, NM_BR_MAX_FORWARD_DELAY, BRIDGE_FORWARD_DELAY_DEFAULT, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -1290,9 +1305,8 @@ nm_setting_bridge_class_init (NMSettingBridgeClass *klass) */ obj_properties[PROP_HELLO_TIME] = g_param_spec_uint (NM_SETTING_BRIDGE_HELLO_TIME, "", "", - 0, NM_BR_MAX_HELLO_TIME, 2, + 0, NM_BR_MAX_HELLO_TIME, BRIDGE_HELLO_TIME_DEFAULT, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -1311,9 +1325,8 @@ nm_setting_bridge_class_init (NMSettingBridgeClass *klass) */ obj_properties[PROP_MAX_AGE] = g_param_spec_uint (NM_SETTING_BRIDGE_MAX_AGE, "", "", - 0, NM_BR_MAX_MAX_AGE, 20, + 0, NM_BR_MAX_MAX_AGE, BRIDGE_MAX_AGE_DEFAULT, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -1332,9 +1345,8 @@ nm_setting_bridge_class_init (NMSettingBridgeClass *klass) */ obj_properties[PROP_AGEING_TIME] = g_param_spec_uint (NM_SETTING_BRIDGE_AGEING_TIME, "", "", - NM_BR_MIN_AGEING_TIME, NM_BR_MAX_AGEING_TIME, 300, + NM_BR_MIN_AGEING_TIME, NM_BR_MAX_AGEING_TIME, BRIDGE_AGEING_TIME_DEFAULT, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -1354,7 +1366,6 @@ nm_setting_bridge_class_init (NMSettingBridgeClass *klass) g_param_spec_uint (NM_SETTING_BRIDGE_GROUP_FORWARD_MASK, "", "", 0, 0xFFFF, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -1378,9 +1389,8 @@ nm_setting_bridge_class_init (NMSettingBridgeClass *klass) */ obj_properties[PROP_MULTICAST_SNOOPING] = g_param_spec_boolean (NM_SETTING_BRIDGE_MULTICAST_SNOOPING, "", "", - TRUE, + BRIDGE_MULTICAST_SNOOPING_DEFAULT, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -1403,7 +1413,6 @@ nm_setting_bridge_class_init (NMSettingBridgeClass *klass) g_param_spec_boolean (NM_SETTING_BRIDGE_VLAN_FILTERING, "", "", FALSE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -1425,9 +1434,8 @@ nm_setting_bridge_class_init (NMSettingBridgeClass *klass) */ obj_properties[PROP_VLAN_DEFAULT_PVID] = g_param_spec_uint (NM_SETTING_BRIDGE_VLAN_DEFAULT_PVID, "", "", - 0, NM_BRIDGE_VLAN_VID_MAX, 1, + 0, NM_BRIDGE_VLAN_VID_MAX, BRIDGE_VLAN_DEFAULT_PVID_DEFAULT, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); diff --git a/libnm-core/nm-setting-cdma.c b/libnm-core/nm-setting-cdma.c index 23ca04b968..e303ab8abd 100644 --- a/libnm-core/nm-setting-cdma.c +++ b/libnm-core/nm-setting-cdma.c @@ -350,7 +350,6 @@ nm_setting_cdma_class_init (NMSettingCdmaClass *klass) g_param_spec_uint (NM_SETTING_CDMA_MTU, "", "", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS); diff --git a/libnm-core/nm-setting-connection.c b/libnm-core/nm-setting-connection.c index 347f6ea65d..800a13b4de 100644 --- a/libnm-core/nm-setting-connection.c +++ b/libnm-core/nm-setting-connection.c @@ -1552,9 +1552,15 @@ nm_setting_connection_init (NMSettingConnection *setting) { NMSettingConnectionPrivate *priv = NM_SETTING_CONNECTION_GET_PRIVATE (setting); - priv->mdns = NM_SETTING_CONNECTION_MDNS_DEFAULT; - priv->llmnr = NM_SETTING_CONNECTION_LLMNR_DEFAULT; - priv->wait_device_timeout = -1; + priv->auth_retries = -1; + priv->autoconnect = TRUE; + priv->autoconnect_priority = NM_SETTING_CONNECTION_AUTOCONNECT_PRIORITY_DEFAULT; + priv->autoconnect_retries = -1; + priv->autoconnect_slaves = NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES_DEFAULT; + priv->lldp = NM_SETTING_CONNECTION_LLDP_DEFAULT; + priv->llmnr = NM_SETTING_CONNECTION_LLMNR_DEFAULT; + priv->mdns = NM_SETTING_CONNECTION_MDNS_DEFAULT; + priv->wait_device_timeout = -1; } /** @@ -1822,7 +1828,6 @@ nm_setting_connection_class_init (NMSettingConnectionClass *klass) g_param_spec_boolean (NM_SETTING_CONNECTION_AUTOCONNECT, "", "", TRUE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS); @@ -1849,7 +1854,6 @@ nm_setting_connection_class_init (NMSettingConnectionClass *klass) NM_SETTING_CONNECTION_AUTOCONNECT_PRIORITY_MAX, NM_SETTING_CONNECTION_AUTOCONNECT_PRIORITY_DEFAULT, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS); @@ -1875,7 +1879,6 @@ nm_setting_connection_class_init (NMSettingConnectionClass *klass) g_param_spec_int (NM_SETTING_CONNECTION_AUTOCONNECT_RETRIES, "", "", -1, G_MAXINT32, -1, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS); @@ -1917,7 +1920,6 @@ nm_setting_connection_class_init (NMSettingConnectionClass *klass) g_param_spec_uint64 (NM_SETTING_CONNECTION_TIMESTAMP, "", "", 0, G_MAXUINT64, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS); _nm_properties_override_gobj (properties_override, @@ -1938,7 +1940,6 @@ nm_setting_connection_class_init (NMSettingConnectionClass *klass) g_param_spec_boolean (NM_SETTING_CONNECTION_READ_ONLY, "", "", FALSE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS); @@ -1965,7 +1966,6 @@ nm_setting_connection_class_init (NMSettingConnectionClass *klass) g_param_spec_string (NM_SETTING_CONNECTION_ZONE, "", "", NULL, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_FUZZY_IGNORE | NM_SETTING_PARAM_REAPPLY_IMMEDIATELY | G_PARAM_STATIC_STRINGS); @@ -2045,7 +2045,6 @@ nm_setting_connection_class_init (NMSettingConnectionClass *klass) NM_TYPE_SETTING_CONNECTION_AUTOCONNECT_SLAVES, NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES_DEFAULT, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS); @@ -2089,7 +2088,6 @@ nm_setting_connection_class_init (NMSettingConnectionClass *klass) g_param_spec_uint (NM_SETTING_CONNECTION_GATEWAY_PING_TIMEOUT, "", "", 0, 600, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -2139,7 +2137,6 @@ nm_setting_connection_class_init (NMSettingConnectionClass *klass) G_MININT32, G_MAXINT32, NM_SETTING_CONNECTION_LLDP_DEFAULT, NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -2164,7 +2161,6 @@ nm_setting_connection_class_init (NMSettingConnectionClass *klass) g_param_spec_int (NM_SETTING_CONNECTION_AUTH_RETRIES, "", "", -1, G_MAXINT32, -1, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS); diff --git a/libnm-core/nm-setting-dcb.c b/libnm-core/nm-setting-dcb.c index a7711b1aaa..415eb37bd0 100644 --- a/libnm-core/nm-setting-dcb.c +++ b/libnm-core/nm-setting-dcb.c @@ -866,8 +866,14 @@ set_property (GObject *object, guint prop_id, /*****************************************************************************/ static void -nm_setting_dcb_init (NMSettingDcb *setting) +nm_setting_dcb_init (NMSettingDcb *self) { + NMSettingDcbPrivate *priv = NM_SETTING_DCB_GET_PRIVATE (self); + + priv->app_fcoe_mode = g_strdup (NM_SETTING_DCB_FCOE_MODE_FABRIC); + priv->app_fcoe_priority = -1; + priv->app_fip_priority = -1; + priv->app_iscsi_priority = -1; } /** @@ -948,7 +954,6 @@ nm_setting_dcb_class_init (NMSettingDcbClass *klass) g_param_spec_int (NM_SETTING_DCB_APP_FCOE_PRIORITY, "", "", -1, 7, -1, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -969,7 +974,6 @@ nm_setting_dcb_class_init (NMSettingDcbClass *klass) g_param_spec_string (NM_SETTING_DCB_APP_FCOE_MODE, "", "", NM_SETTING_DCB_FCOE_MODE_FABRIC, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -1011,7 +1015,6 @@ nm_setting_dcb_class_init (NMSettingDcbClass *klass) g_param_spec_int (NM_SETTING_DCB_APP_ISCSI_PRIORITY, "", "", -1, 7, -1, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -1053,7 +1056,6 @@ nm_setting_dcb_class_init (NMSettingDcbClass *klass) g_param_spec_int (NM_SETTING_DCB_APP_FIP_PRIORITY, "", "", -1, 7, -1, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** diff --git a/libnm-core/nm-setting-gsm.c b/libnm-core/nm-setting-gsm.c index 545791e7c4..1a72e17ad4 100644 --- a/libnm-core/nm-setting-gsm.c +++ b/libnm-core/nm-setting-gsm.c @@ -836,7 +836,6 @@ nm_setting_gsm_class_init (NMSettingGsmClass *klass) g_param_spec_uint (NM_SETTING_GSM_MTU, "", "", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS); diff --git a/libnm-core/nm-setting-infiniband.c b/libnm-core/nm-setting-infiniband.c index 8c55048865..6af950c5a6 100644 --- a/libnm-core/nm-setting-infiniband.c +++ b/libnm-core/nm-setting-infiniband.c @@ -339,8 +339,11 @@ set_property (GObject *object, guint prop_id, /*****************************************************************************/ static void -nm_setting_infiniband_init (NMSettingInfiniband *setting) +nm_setting_infiniband_init (NMSettingInfiniband *self) { + NMSettingInfinibandPrivate *priv = NM_SETTING_INFINIBAND_GET_PRIVATE (self); + + priv->p_key = -1; } /** @@ -433,7 +436,6 @@ nm_setting_infiniband_class_init (NMSettingInfinibandClass *klass) g_param_spec_uint (NM_SETTING_INFINIBAND_MTU, "", "", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS); @@ -455,7 +457,6 @@ nm_setting_infiniband_class_init (NMSettingInfinibandClass *klass) g_param_spec_string (NM_SETTING_INFINIBAND_TRANSPORT_MODE, "", "", NULL, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -481,7 +482,6 @@ nm_setting_infiniband_class_init (NMSettingInfinibandClass *klass) g_param_spec_int (NM_SETTING_INFINIBAND_P_KEY, "", "", -1, 0xFFFF, -1, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -505,7 +505,6 @@ nm_setting_infiniband_class_init (NMSettingInfinibandClass *klass) g_param_spec_string (NM_SETTING_INFINIBAND_PARENT, "", "", NULL, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); diff --git a/libnm-core/nm-setting-ip-config.c b/libnm-core/nm-setting-ip-config.c index dcbc842415..658b563798 100644 --- a/libnm-core/nm-setting-ip-config.c +++ b/libnm-core/nm-setting-ip-config.c @@ -5501,11 +5501,14 @@ nm_setting_ip_config_init (NMSettingIPConfig *setting) { NMSettingIPConfigPrivate *priv = NM_SETTING_IP_CONFIG_GET_PRIVATE (setting); - priv->dns = g_ptr_array_new_with_free_func (g_free); - priv->dns_search = g_ptr_array_new_with_free_func (g_free); - priv->dns_options = NULL; - priv->addresses = g_ptr_array_new_with_free_func ((GDestroyNotify) nm_ip_address_unref); - priv->routes = g_ptr_array_new_with_free_func ((GDestroyNotify) nm_ip_route_unref); + priv->dns = g_ptr_array_new_with_free_func (g_free); + priv->dns_search = g_ptr_array_new_with_free_func (g_free); + priv->addresses = g_ptr_array_new_with_free_func ((GDestroyNotify) nm_ip_address_unref); + priv->routes = g_ptr_array_new_with_free_func ((GDestroyNotify) nm_ip_route_unref); + priv->route_metric = -1; + priv->dhcp_send_hostname = TRUE; + priv->may_fail = TRUE; + priv->dad_timeout = -1; } static void @@ -5659,7 +5662,6 @@ nm_setting_ip_config_class_init (NMSettingIPConfigClass *klass) g_param_spec_int (NM_SETTING_IP_CONFIG_DNS_PRIORITY, "", "", G_MININT32, G_MAXINT32, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -5724,7 +5726,6 @@ nm_setting_ip_config_class_init (NMSettingIPConfigClass *klass) g_param_spec_int64 (NM_SETTING_IP_CONFIG_ROUTE_METRIC, "", "", -1, G_MAXUINT32, -1, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -5765,7 +5766,6 @@ nm_setting_ip_config_class_init (NMSettingIPConfigClass *klass) g_param_spec_boolean (NM_SETTING_IP_CONFIG_IGNORE_AUTO_ROUTES, "", "", FALSE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -5781,7 +5781,6 @@ nm_setting_ip_config_class_init (NMSettingIPConfigClass *klass) g_param_spec_boolean (NM_SETTING_IP_CONFIG_IGNORE_AUTO_DNS, "", "", FALSE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -5811,7 +5810,6 @@ nm_setting_ip_config_class_init (NMSettingIPConfigClass *klass) g_param_spec_boolean (NM_SETTING_IP_CONFIG_DHCP_SEND_HOSTNAME, "", "", TRUE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -5825,7 +5823,6 @@ nm_setting_ip_config_class_init (NMSettingIPConfigClass *klass) g_param_spec_boolean (NM_SETTING_IP_CONFIG_NEVER_DEFAULT, "", "", FALSE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -5843,7 +5840,6 @@ nm_setting_ip_config_class_init (NMSettingIPConfigClass *klass) g_param_spec_boolean (NM_SETTING_IP_CONFIG_MAY_FAIL, "", "", TRUE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -5864,7 +5860,6 @@ nm_setting_ip_config_class_init (NMSettingIPConfigClass *klass) g_param_spec_int (NM_SETTING_IP_CONFIG_DAD_TIMEOUT, "", "", -1, NM_SETTING_IP_CONFIG_DAD_TIMEOUT_MAX, -1, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS); diff --git a/libnm-core/nm-setting-ip-tunnel.c b/libnm-core/nm-setting-ip-tunnel.c index 20ec5c4189..cd5ccc4930 100644 --- a/libnm-core/nm-setting-ip-tunnel.c +++ b/libnm-core/nm-setting-ip-tunnel.c @@ -576,8 +576,11 @@ set_property (GObject *object, guint prop_id, /*****************************************************************************/ static void -nm_setting_ip_tunnel_init (NMSettingIPTunnel *setting) +nm_setting_ip_tunnel_init (NMSettingIPTunnel *self) { + NMSettingIPTunnelPrivate *priv = NM_SETTING_IP_TUNNEL_GET_PRIVATE (self); + + priv->path_mtu_discovery = TRUE; } /** @@ -697,7 +700,6 @@ nm_setting_ip_tunnel_class_init (NMSettingIPTunnelClass *klass) g_param_spec_uint (NM_SETTING_IP_TUNNEL_TTL, "", "", 0, 255, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -713,7 +715,6 @@ nm_setting_ip_tunnel_class_init (NMSettingIPTunnelClass *klass) g_param_spec_uint (NM_SETTING_IP_TUNNEL_TOS, "", "", 0, 255, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -728,7 +729,6 @@ nm_setting_ip_tunnel_class_init (NMSettingIPTunnelClass *klass) g_param_spec_boolean (NM_SETTING_IP_TUNNEL_PATH_MTU_DISCOVERY, "", "", TRUE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -774,7 +774,6 @@ nm_setting_ip_tunnel_class_init (NMSettingIPTunnelClass *klass) g_param_spec_uint (NM_SETTING_IP_TUNNEL_ENCAPSULATION_LIMIT, "", "", 0, 255, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -790,7 +789,6 @@ nm_setting_ip_tunnel_class_init (NMSettingIPTunnelClass *klass) g_param_spec_uint (NM_SETTING_IP_TUNNEL_FLOW_LABEL, "", "", 0, (1 << 20) - 1, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -806,7 +804,6 @@ nm_setting_ip_tunnel_class_init (NMSettingIPTunnelClass *klass) g_param_spec_uint (NM_SETTING_IP_TUNNEL_MTU, "", "", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS); diff --git a/libnm-core/nm-setting-ip6-config.c b/libnm-core/nm-setting-ip6-config.c index c7962deba0..bef4e061c9 100644 --- a/libnm-core/nm-setting-ip6-config.c +++ b/libnm-core/nm-setting-ip6-config.c @@ -513,6 +513,10 @@ set_property (GObject *object, guint prop_id, static void nm_setting_ip6_config_init (NMSettingIP6Config *setting) { + NMSettingIP6ConfigPrivate *priv = NM_SETTING_IP6_CONFIG_GET_PRIVATE (setting); + + priv->ip6_privacy = NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN; + priv->addr_gen_mode = NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE_STABLE_PRIVACY; } /** @@ -754,7 +758,6 @@ nm_setting_ip6_config_class_init (NMSettingIP6ConfigClass *klass) NM_TYPE_SETTING_IP6_CONFIG_PRIVACY, NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -803,7 +806,6 @@ nm_setting_ip6_config_class_init (NMSettingIP6ConfigClass *klass) G_MININT, G_MAXINT, NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE_STABLE_PRIVACY, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** diff --git a/libnm-core/nm-setting-macsec.c b/libnm-core/nm-setting-macsec.c index 2f3d416d36..87f4492d97 100644 --- a/libnm-core/nm-setting-macsec.c +++ b/libnm-core/nm-setting-macsec.c @@ -458,8 +458,15 @@ set_property (GObject *object, guint prop_id, /*****************************************************************************/ static void -nm_setting_macsec_init (NMSettingMacsec *setting) +nm_setting_macsec_init (NMSettingMacsec *self) { + NMSettingMacsecPrivate *priv = NM_SETTING_MACSEC_GET_PRIVATE (self); + + nm_assert (priv->mode == NM_SETTING_MACSEC_MODE_PSK); + priv->encrypt = TRUE; + priv->port = 1; + priv->send_sci = TRUE; + priv->validation = NM_SETTING_MACSEC_VALIDATION_STRICT; } /** @@ -519,7 +526,6 @@ nm_setting_macsec_class_init (NMSettingMacsecClass *klass) g_param_spec_string (NM_SETTING_MACSEC_PARENT, "", "", NULL, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -535,7 +541,6 @@ nm_setting_macsec_class_init (NMSettingMacsecClass *klass) g_param_spec_int (NM_SETTING_MACSEC_MODE, "", "", G_MININT, G_MAXINT, NM_SETTING_MACSEC_MODE_PSK, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -550,7 +555,6 @@ nm_setting_macsec_class_init (NMSettingMacsecClass *klass) g_param_spec_boolean (NM_SETTING_MACSEC_ENCRYPT, "", "", TRUE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -565,7 +569,6 @@ nm_setting_macsec_class_init (NMSettingMacsecClass *klass) g_param_spec_string (NM_SETTING_MACSEC_MKA_CAK, "", "", NULL, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_SECRET | G_PARAM_STATIC_STRINGS); @@ -596,7 +599,6 @@ nm_setting_macsec_class_init (NMSettingMacsecClass *klass) g_param_spec_string (NM_SETTING_MACSEC_MKA_CKN, "", "", NULL, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -610,7 +612,6 @@ nm_setting_macsec_class_init (NMSettingMacsecClass *klass) g_param_spec_int (NM_SETTING_MACSEC_PORT, "", "", 1, 65534, 1, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -625,7 +626,6 @@ nm_setting_macsec_class_init (NMSettingMacsecClass *klass) g_param_spec_int (NM_SETTING_MACSEC_VALIDATION, "", "", G_MININT, G_MAXINT, NM_SETTING_MACSEC_VALIDATION_STRICT, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -641,7 +641,6 @@ nm_setting_macsec_class_init (NMSettingMacsecClass *klass) g_param_spec_boolean (NM_SETTING_MACSEC_SEND_SCI, "", "", TRUE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); g_object_class_install_properties (object_class, _PROPERTY_ENUMS_LAST, obj_properties); diff --git a/libnm-core/nm-setting-macvlan.c b/libnm-core/nm-setting-macvlan.c index 81e490d222..33711b0df7 100644 --- a/libnm-core/nm-setting-macvlan.c +++ b/libnm-core/nm-setting-macvlan.c @@ -217,8 +217,11 @@ set_property (GObject *object, guint prop_id, /*****************************************************************************/ static void -nm_setting_macvlan_init (NMSettingMacvlan *setting) +nm_setting_macvlan_init (NMSettingMacvlan *self) { + NMSettingMacvlanPrivate *priv = NM_SETTING_MACVLAN_GET_PRIVATE (self); + + priv->promiscuous = TRUE; } /** @@ -275,7 +278,6 @@ nm_setting_macvlan_class_init (NMSettingMacvlanClass *klass) g_param_spec_string (NM_SETTING_MACVLAN_PARENT, "", "", NULL, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -291,7 +293,6 @@ nm_setting_macvlan_class_init (NMSettingMacvlanClass *klass) g_param_spec_uint (NM_SETTING_MACVLAN_MODE, "", "", 0, G_MAXUINT, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -306,7 +307,6 @@ nm_setting_macvlan_class_init (NMSettingMacvlanClass *klass) g_param_spec_boolean (NM_SETTING_MACVLAN_PROMISCUOUS, "", "", TRUE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -321,7 +321,6 @@ nm_setting_macvlan_class_init (NMSettingMacvlanClass *klass) g_param_spec_boolean (NM_SETTING_MACVLAN_TAP, "", "", FALSE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); diff --git a/libnm-core/nm-setting-olpc-mesh.c b/libnm-core/nm-setting-olpc-mesh.c index c4944a3ef5..e1740a46af 100644 --- a/libnm-core/nm-setting-olpc-mesh.c +++ b/libnm-core/nm-setting-olpc-mesh.c @@ -234,7 +234,6 @@ nm_setting_olpc_mesh_class_init (NMSettingOlpcMeshClass *klass) g_param_spec_uint (NM_SETTING_OLPC_MESH_CHANNEL, "", "", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); diff --git a/libnm-core/nm-setting-ovs-bridge.c b/libnm-core/nm-setting-ovs-bridge.c index 2a6d0e2a35..2f907885fb 100644 --- a/libnm-core/nm-setting-ovs-bridge.c +++ b/libnm-core/nm-setting-ovs-bridge.c @@ -305,7 +305,6 @@ nm_setting_ovs_bridge_class_init (NMSettingOvsBridgeClass *klass) g_param_spec_string (NM_SETTING_OVS_BRIDGE_FAIL_MODE, "", "", NULL, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -320,7 +319,6 @@ nm_setting_ovs_bridge_class_init (NMSettingOvsBridgeClass *klass) g_param_spec_boolean (NM_SETTING_OVS_BRIDGE_MCAST_SNOOPING_ENABLE, "", "", FALSE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -334,7 +332,6 @@ nm_setting_ovs_bridge_class_init (NMSettingOvsBridgeClass *klass) g_param_spec_boolean (NM_SETTING_OVS_BRIDGE_RSTP_ENABLE, "", "", FALSE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -348,7 +345,6 @@ nm_setting_ovs_bridge_class_init (NMSettingOvsBridgeClass *klass) g_param_spec_boolean (NM_SETTING_OVS_BRIDGE_STP_ENABLE, "", "", FALSE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** diff --git a/libnm-core/nm-setting-ovs-dpdk.c b/libnm-core/nm-setting-ovs-dpdk.c index ed3c3255c7..0318053597 100644 --- a/libnm-core/nm-setting-ovs-dpdk.c +++ b/libnm-core/nm-setting-ovs-dpdk.c @@ -148,7 +148,6 @@ nm_setting_ovs_dpdk_class_init (NMSettingOvsDpdkClass *klass) g_param_spec_string (NM_SETTING_OVS_DPDK_DEVARGS, "", "", NULL, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); diff --git a/libnm-core/nm-setting-ovs-interface.c b/libnm-core/nm-setting-ovs-interface.c index ecefd6a5d9..8b341e928f 100644 --- a/libnm-core/nm-setting-ovs-interface.c +++ b/libnm-core/nm-setting-ovs-interface.c @@ -383,7 +383,6 @@ nm_setting_ovs_interface_class_init (NMSettingOvsInterfaceClass *klass) g_param_spec_string (NM_SETTING_OVS_INTERFACE_TYPE, "", "", NULL, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); diff --git a/libnm-core/nm-setting-ovs-patch.c b/libnm-core/nm-setting-ovs-patch.c index e74a35caf8..b211cc1457 100644 --- a/libnm-core/nm-setting-ovs-patch.c +++ b/libnm-core/nm-setting-ovs-patch.c @@ -188,7 +188,6 @@ nm_setting_ovs_patch_class_init (NMSettingOvsPatchClass *klass) g_param_spec_string (NM_SETTING_OVS_PATCH_PEER, "", "", NULL, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); diff --git a/libnm-core/nm-setting-ovs-port.c b/libnm-core/nm-setting-ovs-port.c index 5ed9c48e92..a2073ed330 100644 --- a/libnm-core/nm-setting-ovs-port.c +++ b/libnm-core/nm-setting-ovs-port.c @@ -367,7 +367,6 @@ nm_setting_ovs_port_class_init (NMSettingOvsPortClass *klass) g_param_spec_string (NM_SETTING_OVS_PORT_VLAN_MODE, "", "", NULL, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -382,7 +381,6 @@ nm_setting_ovs_port_class_init (NMSettingOvsPortClass *klass) g_param_spec_uint (NM_SETTING_OVS_PORT_TAG, "", "", 0, 4095, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -397,7 +395,6 @@ nm_setting_ovs_port_class_init (NMSettingOvsPortClass *klass) g_param_spec_string (NM_SETTING_OVS_PORT_LACP, "", "", NULL, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -412,7 +409,6 @@ nm_setting_ovs_port_class_init (NMSettingOvsPortClass *klass) g_param_spec_string (NM_SETTING_OVS_PORT_BOND_MODE, "", "", NULL, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -427,7 +423,6 @@ nm_setting_ovs_port_class_init (NMSettingOvsPortClass *klass) g_param_spec_uint (NM_SETTING_OVS_PORT_BOND_UPDELAY, "", "", 0, G_MAXUINT, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -442,7 +437,6 @@ nm_setting_ovs_port_class_init (NMSettingOvsPortClass *klass) g_param_spec_uint (NM_SETTING_OVS_PORT_BOND_DOWNDELAY, "", "", 0, G_MAXUINT, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); diff --git a/libnm-core/nm-setting-ppp.c b/libnm-core/nm-setting-ppp.c index bf51391b5f..090f3c0840 100644 --- a/libnm-core/nm-setting-ppp.c +++ b/libnm-core/nm-setting-ppp.c @@ -495,8 +495,11 @@ set_property (GObject *object, guint prop_id, /*****************************************************************************/ static void -nm_setting_ppp_init (NMSettingPpp *setting) +nm_setting_ppp_init (NMSettingPpp *self) { + NMSettingPppPrivate *priv = NM_SETTING_PPP_GET_PRIVATE (self); + + priv->noauth = TRUE; } /** @@ -536,7 +539,6 @@ nm_setting_ppp_class_init (NMSettingPppClass *klass) g_param_spec_boolean (NM_SETTING_PPP_NOAUTH, "", "", TRUE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -548,7 +550,6 @@ nm_setting_ppp_class_init (NMSettingPppClass *klass) g_param_spec_boolean (NM_SETTING_PPP_REFUSE_EAP, "", "", FALSE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -560,7 +561,6 @@ nm_setting_ppp_class_init (NMSettingPppClass *klass) g_param_spec_boolean (NM_SETTING_PPP_REFUSE_PAP, "", "", FALSE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -572,7 +572,6 @@ nm_setting_ppp_class_init (NMSettingPppClass *klass) g_param_spec_boolean (NM_SETTING_PPP_REFUSE_CHAP, "", "", FALSE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -584,7 +583,6 @@ nm_setting_ppp_class_init (NMSettingPppClass *klass) g_param_spec_boolean (NM_SETTING_PPP_REFUSE_MSCHAP, "", "", FALSE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -596,7 +594,6 @@ nm_setting_ppp_class_init (NMSettingPppClass *klass) g_param_spec_boolean (NM_SETTING_PPP_REFUSE_MSCHAPV2, "", "", FALSE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -608,7 +605,6 @@ nm_setting_ppp_class_init (NMSettingPppClass *klass) g_param_spec_boolean (NM_SETTING_PPP_NOBSDCOMP, "", "", FALSE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS); @@ -621,7 +617,6 @@ nm_setting_ppp_class_init (NMSettingPppClass *klass) g_param_spec_boolean (NM_SETTING_PPP_NODEFLATE, "", "", FALSE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS); @@ -634,7 +629,6 @@ nm_setting_ppp_class_init (NMSettingPppClass *klass) g_param_spec_boolean (NM_SETTING_PPP_NO_VJ_COMP, "", "", FALSE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS); @@ -650,7 +644,6 @@ nm_setting_ppp_class_init (NMSettingPppClass *klass) g_param_spec_boolean (NM_SETTING_PPP_REQUIRE_MPPE, "", "", FALSE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -663,7 +656,7 @@ nm_setting_ppp_class_init (NMSettingPppClass *klass) obj_properties[PROP_REQUIRE_MPPE_128] = g_param_spec_boolean (NM_SETTING_PPP_REQUIRE_MPPE_128, "", "", FALSE, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT | + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); /** @@ -676,7 +669,6 @@ nm_setting_ppp_class_init (NMSettingPppClass *klass) g_param_spec_boolean (NM_SETTING_PPP_MPPE_STATEFUL, "", "", FALSE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -690,7 +682,6 @@ nm_setting_ppp_class_init (NMSettingPppClass *klass) g_param_spec_boolean (NM_SETTING_PPP_CRTSCTS, "", "", FALSE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -704,7 +695,6 @@ nm_setting_ppp_class_init (NMSettingPppClass *klass) g_param_spec_uint (NM_SETTING_PPP_BAUD, "", "", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS); @@ -719,7 +709,6 @@ nm_setting_ppp_class_init (NMSettingPppClass *klass) g_param_spec_uint (NM_SETTING_PPP_MRU, "", "", 0, 16384, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -732,7 +721,6 @@ nm_setting_ppp_class_init (NMSettingPppClass *klass) g_param_spec_uint (NM_SETTING_PPP_MTU, "", "", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS); @@ -748,7 +736,6 @@ nm_setting_ppp_class_init (NMSettingPppClass *klass) g_param_spec_uint (NM_SETTING_PPP_LCP_ECHO_FAILURE, "", "", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS); @@ -764,7 +751,6 @@ nm_setting_ppp_class_init (NMSettingPppClass *klass) g_param_spec_uint (NM_SETTING_PPP_LCP_ECHO_INTERVAL, "", "", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS); diff --git a/libnm-core/nm-setting-pppoe.c b/libnm-core/nm-setting-pppoe.c index d9ff2a80d3..b14103cb0d 100644 --- a/libnm-core/nm-setting-pppoe.c +++ b/libnm-core/nm-setting-pppoe.c @@ -302,7 +302,6 @@ nm_setting_pppoe_class_init (NMSettingPppoeClass *klass) g_param_spec_string (NM_SETTING_PPPOE_PARENT, "", "", NULL, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); diff --git a/libnm-core/nm-setting-proxy.c b/libnm-core/nm-setting-proxy.c index a2dfc9120d..082ac6d0a5 100644 --- a/libnm-core/nm-setting-proxy.c +++ b/libnm-core/nm-setting-proxy.c @@ -241,8 +241,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 +307,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); /** diff --git a/libnm-core/nm-setting-serial.c b/libnm-core/nm-setting-serial.c index 212dc6cfd0..fe7c05ee6f 100644 --- a/libnm-core/nm-setting-serial.c +++ b/libnm-core/nm-setting-serial.c @@ -206,8 +206,14 @@ set_property (GObject *object, guint prop_id, /*****************************************************************************/ static void -nm_setting_serial_init (NMSettingSerial *setting) +nm_setting_serial_init (NMSettingSerial *self) { + NMSettingSerialPrivate *priv = NM_SETTING_SERIAL_GET_PRIVATE (self); + + nm_assert (priv->parity == NM_SETTING_SERIAL_PARITY_NONE); + priv->stopbits = 1; + priv->baud = 57600; + priv->bits = 8; } /** @@ -246,7 +252,6 @@ nm_setting_serial_class_init (NMSettingSerialClass *klass) g_param_spec_uint (NM_SETTING_SERIAL_BAUD, "", "", 0, G_MAXUINT, 57600, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -258,7 +263,6 @@ nm_setting_serial_class_init (NMSettingSerialClass *klass) g_param_spec_uint (NM_SETTING_SERIAL_BITS, "", "", 5, 8, 8, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -286,7 +290,6 @@ nm_setting_serial_class_init (NMSettingSerialClass *klass) NM_TYPE_SETTING_SERIAL_PARITY, NM_SETTING_SERIAL_PARITY_NONE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); _nm_properties_override_gobj (properties_override, obj_properties[PROP_PARITY], @@ -306,7 +309,6 @@ nm_setting_serial_class_init (NMSettingSerialClass *klass) g_param_spec_uint (NM_SETTING_SERIAL_STOPBITS, "", "", 1, 2, 1, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -318,7 +320,6 @@ nm_setting_serial_class_init (NMSettingSerialClass *klass) g_param_spec_uint64 (NM_SETTING_SERIAL_SEND_DELAY, "", "", 0, G_MAXUINT64, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); g_object_class_install_properties (object_class, _PROPERTY_ENUMS_LAST, obj_properties); diff --git a/libnm-core/nm-setting-sriov.c b/libnm-core/nm-setting-sriov.c index 9ef68cce61..88801bd824 100644 --- a/libnm-core/nm-setting-sriov.c +++ b/libnm-core/nm-setting-sriov.c @@ -1217,6 +1217,8 @@ static void nm_setting_sriov_init (NMSettingSriov *setting) { setting->vfs = g_ptr_array_new_with_free_func ((GDestroyNotify) nm_sriov_vf_unref); + + setting->autoprobe_drivers = NM_TERNARY_DEFAULT; } /** @@ -1282,7 +1284,6 @@ nm_setting_sriov_class_init (NMSettingSriovClass *klass) 0, G_MAXUINT32, 0, NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -1370,7 +1371,6 @@ nm_setting_sriov_class_init (NMSettingSriovClass *klass) NM_TERNARY_DEFAULT, NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); g_object_class_install_properties (object_class, _PROPERTY_ENUMS_LAST, obj_properties); diff --git a/libnm-core/nm-setting-tun.c b/libnm-core/nm-setting-tun.c index 93063020fc..ba9e64ad49 100644 --- a/libnm-core/nm-setting-tun.c +++ b/libnm-core/nm-setting-tun.c @@ -248,8 +248,11 @@ set_property (GObject *object, guint prop_id, /*****************************************************************************/ static void -nm_setting_tun_init (NMSettingTun *setting) +nm_setting_tun_init (NMSettingTun *self) { + NMSettingTunPrivate *priv = NM_SETTING_TUN_GET_PRIVATE (self); + + priv->mode = NM_SETTING_TUN_MODE_TUN; } /** @@ -307,7 +310,6 @@ nm_setting_tun_class_init (NMSettingTunClass *klass) g_param_spec_uint (NM_SETTING_TUN_MODE, "", "", 0, G_MAXUINT, NM_SETTING_TUN_MODE_TUN, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); diff --git a/libnm-core/nm-setting-vlan.c b/libnm-core/nm-setting-vlan.c index 1d63734694..96b7837819 100644 --- a/libnm-core/nm-setting-vlan.c +++ b/libnm-core/nm-setting-vlan.c @@ -791,8 +791,11 @@ set_property (GObject *object, guint prop_id, /*****************************************************************************/ static void -nm_setting_vlan_init (NMSettingVlan *setting) +nm_setting_vlan_init (NMSettingVlan *self) { + NMSettingVlanPrivate *priv = NM_SETTING_VLAN_GET_PRIVATE (self); + + priv->flags = NM_VLAN_FLAG_REORDER_HEADERS; } /** @@ -854,7 +857,6 @@ nm_setting_vlan_class_init (NMSettingVlanClass *klass) g_param_spec_string (NM_SETTING_VLAN_PARENT, "", "", NULL, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -874,7 +876,6 @@ nm_setting_vlan_class_init (NMSettingVlanClass *klass) g_param_spec_uint (NM_SETTING_VLAN_ID, "", "", 0, 4095, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -905,7 +906,6 @@ nm_setting_vlan_class_init (NMSettingVlanClass *klass) NM_TYPE_VLAN_FLAGS, NM_VLAN_FLAG_REORDER_HEADERS, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); _nm_properties_override_gobj (properties_override, diff --git a/libnm-core/nm-setting-vxlan.c b/libnm-core/nm-setting-vxlan.c index 5dd801664f..15c2687599 100644 --- a/libnm-core/nm-setting-vxlan.c +++ b/libnm-core/nm-setting-vxlan.c @@ -519,8 +519,13 @@ set_property (GObject *object, guint prop_id, /*****************************************************************************/ static void -nm_setting_vxlan_init (NMSettingVxlan *setting) +nm_setting_vxlan_init (NMSettingVxlan *self) { + NMSettingVxlanPrivate *priv = NM_SETTING_VXLAN_GET_PRIVATE (self); + + priv->destination_port = DST_PORT_DEFAULT; + priv->ageing = 300; + priv->learning = TRUE; } /** @@ -576,7 +581,6 @@ nm_setting_vxlan_class_init (NMSettingVxlanClass *klass) g_param_spec_string (NM_SETTING_VXLAN_PARENT, "", "", NULL, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); /** @@ -591,7 +595,6 @@ nm_setting_vxlan_class_init (NMSettingVxlanClass *klass) g_param_spec_uint (NM_SETTING_VXLAN_ID, "", "", 0, (1 << 24) - 1, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -606,7 +609,6 @@ nm_setting_vxlan_class_init (NMSettingVxlanClass *klass) g_param_spec_string (NM_SETTING_VXLAN_LOCAL, "", "", NULL, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -623,7 +625,6 @@ nm_setting_vxlan_class_init (NMSettingVxlanClass *klass) g_param_spec_string (NM_SETTING_VXLAN_REMOTE, "", "", NULL, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -639,7 +640,6 @@ nm_setting_vxlan_class_init (NMSettingVxlanClass *klass) g_param_spec_uint (NM_SETTING_VXLAN_SOURCE_PORT_MIN, "", "", 0, G_MAXUINT16, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -655,7 +655,6 @@ nm_setting_vxlan_class_init (NMSettingVxlanClass *klass) g_param_spec_uint (NM_SETTING_VXLAN_SOURCE_PORT_MAX, "", "", 0, G_MAXUINT16, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -671,7 +670,6 @@ nm_setting_vxlan_class_init (NMSettingVxlanClass *klass) g_param_spec_uint (NM_SETTING_VXLAN_DESTINATION_PORT, "", "", 0, G_MAXUINT16, DST_PORT_DEFAULT, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -686,7 +684,6 @@ nm_setting_vxlan_class_init (NMSettingVxlanClass *klass) g_param_spec_uint (NM_SETTING_VXLAN_AGEING, "", "", 0, G_MAXUINT32, 300, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -702,7 +699,6 @@ nm_setting_vxlan_class_init (NMSettingVxlanClass *klass) g_param_spec_uint (NM_SETTING_VXLAN_LIMIT, "", "", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -717,7 +713,6 @@ nm_setting_vxlan_class_init (NMSettingVxlanClass *klass) g_param_spec_uint (NM_SETTING_VXLAN_TOS, "", "", 0, 255, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -732,7 +727,6 @@ nm_setting_vxlan_class_init (NMSettingVxlanClass *klass) g_param_spec_uint (NM_SETTING_VXLAN_TTL, "", "", 0, 255, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -747,7 +741,6 @@ nm_setting_vxlan_class_init (NMSettingVxlanClass *klass) g_param_spec_boolean (NM_SETTING_VXLAN_PROXY, "", "", FALSE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -763,7 +756,6 @@ nm_setting_vxlan_class_init (NMSettingVxlanClass *klass) g_param_spec_boolean (NM_SETTING_VXLAN_LEARNING, "", "", TRUE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); /** @@ -777,7 +769,6 @@ nm_setting_vxlan_class_init (NMSettingVxlanClass *klass) g_param_spec_boolean (NM_SETTING_VXLAN_RSC, "", "", FALSE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); /** @@ -791,7 +782,6 @@ nm_setting_vxlan_class_init (NMSettingVxlanClass *klass) g_param_spec_boolean (NM_SETTING_VXLAN_L2_MISS, "", "", FALSE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); @@ -806,7 +796,6 @@ nm_setting_vxlan_class_init (NMSettingVxlanClass *klass) g_param_spec_boolean (NM_SETTING_VXLAN_L3_MISS, "", "", FALSE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS); diff --git a/libnm-core/nm-setting-wired.c b/libnm-core/nm-setting-wired.c index d376b32e55..e8837df0af 100644 --- a/libnm-core/nm-setting-wired.c +++ b/libnm-core/nm-setting-wired.c @@ -1145,6 +1145,8 @@ nm_setting_wired_init (NMSettingWired *setting) /* We use GArray rather than GPtrArray so it will automatically be NULL-terminated */ priv->mac_address_blacklist = g_array_new (TRUE, FALSE, sizeof (char *)); g_array_set_clear_func (priv->mac_address_blacklist, (GDestroyNotify) clear_blacklist_item); + + priv->wol = NM_SETTING_WIRED_WAKE_ON_LAN_DEFAULT; } /** @@ -1248,7 +1250,6 @@ nm_setting_wired_class_init (NMSettingWiredClass *klass) g_param_spec_uint (NM_SETTING_WIRED_SPEED, "", "", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -1304,7 +1305,6 @@ nm_setting_wired_class_init (NMSettingWiredClass *klass) g_param_spec_boolean (NM_SETTING_WIRED_AUTO_NEGOTIATE, "", "", FALSE, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); _nm_properties_override_gobj (properties_override, obj_properties[PROP_AUTO_NEGOTIATE], @@ -1501,7 +1501,6 @@ nm_setting_wired_class_init (NMSettingWiredClass *klass) g_param_spec_uint (NM_SETTING_WIRED_MTU, "", "", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS); @@ -1591,7 +1590,6 @@ nm_setting_wired_class_init (NMSettingWiredClass *klass) obj_properties[PROP_WAKE_ON_LAN] = g_param_spec_uint (NM_SETTING_WIRED_WAKE_ON_LAN, "", "", 0, G_MAXUINT32, NM_SETTING_WIRED_WAKE_ON_LAN_DEFAULT, - G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); diff --git a/libnm-core/nm-setting-wireless-security.c b/libnm-core/nm-setting-wireless-security.c index f67097704a..1fedf93ad1 100644 --- a/libnm-core/nm-setting-wireless-security.c +++ b/libnm-core/nm-setting-wireless-security.c @@ -1357,8 +1357,10 @@ set_property (GObject *object, guint prop_id, /*****************************************************************************/ static void -nm_setting_wireless_security_init (NMSettingWirelessSecurity *setting) +nm_setting_wireless_security_init (NMSettingWirelessSecurity *self) { + nm_assert (NM_SETTING_WIRELESS_SECURITY_GET_PRIVATE (self)->wep_key_type == NM_WEP_KEY_TYPE_UNKNOWN); + nm_assert (NM_SETTING_WIRELESS_SECURITY_GET_PRIVATE (self)->wps_method == NM_SETTING_WIRELESS_SECURITY_WPS_METHOD_DEFAULT); } /** @@ -1459,7 +1461,6 @@ nm_setting_wireless_security_class_init (NMSettingWirelessSecurityClass *klass) g_param_spec_uint (NM_SETTING_WIRELESS_SECURITY_WEP_TX_KEYIDX, "", "", 0, 3, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -1575,7 +1576,6 @@ nm_setting_wireless_security_class_init (NMSettingWirelessSecurityClass *klass) g_param_spec_int (NM_SETTING_WIRELESS_SECURITY_PMF, "", "", G_MININT32, G_MAXINT32, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS); @@ -1802,7 +1802,6 @@ nm_setting_wireless_security_class_init (NMSettingWirelessSecurityClass *klass) NM_TYPE_WEP_KEY_TYPE, NM_WEP_KEY_TYPE_UNKNOWN, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); _nm_properties_override_gobj (properties_override, obj_properties[PROP_WEP_KEY_TYPE], @@ -1837,7 +1836,6 @@ nm_setting_wireless_security_class_init (NMSettingWirelessSecurityClass *klass) g_param_spec_uint (NM_SETTING_WIRELESS_SECURITY_WPS_METHOD, "", "", 0, G_MAXUINT32, NM_SETTING_WIRELESS_SECURITY_WPS_METHOD_DEFAULT, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS); @@ -1867,7 +1865,6 @@ nm_setting_wireless_security_class_init (NMSettingWirelessSecurityClass *klass) g_param_spec_int (NM_SETTING_WIRELESS_SECURITY_FILS, "", "", G_MININT32, G_MAXINT32, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS); diff --git a/libnm-core/nm-setting-wireless.c b/libnm-core/nm-setting-wireless.c index c406569c75..37345d088f 100644 --- a/libnm-core/nm-setting-wireless.c +++ b/libnm-core/nm-setting-wireless.c @@ -1219,6 +1219,8 @@ nm_setting_wireless_init (NMSettingWireless *setting) /* We use GArray rather than GPtrArray so it will automatically be NULL-terminated */ priv->mac_address_blacklist = g_array_new (TRUE, FALSE, sizeof (char *)); g_array_set_clear_func (priv->mac_address_blacklist, (GDestroyNotify) clear_blacklist_item); + + priv->wowl = NM_SETTING_WIRELESS_WAKE_ON_WLAN_DEFAULT; } /** @@ -1359,7 +1361,6 @@ nm_setting_wireless_class_init (NMSettingWirelessClass *klass) g_param_spec_uint (NM_SETTING_WIRELESS_CHANNEL, "", "", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** @@ -1402,7 +1403,6 @@ nm_setting_wireless_class_init (NMSettingWirelessClass *klass) g_param_spec_uint (NM_SETTING_WIRELESS_RATE, "", "", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS); @@ -1423,7 +1423,6 @@ nm_setting_wireless_class_init (NMSettingWirelessClass *klass) g_param_spec_uint (NM_SETTING_WIRELESS_TX_POWER, "", "", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS); @@ -1640,7 +1639,6 @@ nm_setting_wireless_class_init (NMSettingWirelessClass *klass) g_param_spec_uint (NM_SETTING_WIRELESS_MTU, "", "", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | NM_SETTING_PARAM_FUZZY_IGNORE | G_PARAM_STATIC_STRINGS); @@ -1768,7 +1766,6 @@ nm_setting_wireless_class_init (NMSettingWirelessClass *klass) obj_properties[PROP_WAKE_ON_WLAN] = g_param_spec_uint (NM_SETTING_WIRELESS_WAKE_ON_WLAN, "", "", 0, G_MAXUINT32, NM_SETTING_WIRELESS_WAKE_ON_WLAN_DEFAULT, - G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); |