diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2020-05-19 16:38:51 +0200 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2020-05-19 16:38:51 +0200 |
| commit | 96642ebde58e1eea692aea6a92d33f45452fa9c0 (patch) | |
| tree | 106ddfa2180b3997e8965787b5cb122982ebab9d /libnm-core/nm-setting-serial.c | |
| parent | 8f6881ac06714ef99cc470a03e7ac0ce1af49a16 (diff) | |
| parent | d460892bbfece74fb6d3cd846bf6ef548290be41 (diff) | |
Merge branch 'upstream/latest' of https://salsa.debian.org/utopia-team/network-manager into upstream/latestt pu
Diffstat (limited to 'libnm-core/nm-setting-serial.c')
| -rw-r--r-- | libnm-core/nm-setting-serial.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/libnm-core/nm-setting-serial.c b/libnm-core/nm-setting-serial.c index c050e238..fe7c05ee 100644 --- a/libnm-core/nm-setting-serial.c +++ b/libnm-core/nm-setting-serial.c @@ -31,11 +31,11 @@ NM_GOBJECT_PROPERTIES_DEFINE_BASE ( ); typedef struct { + guint64 send_delay; guint baud; guint bits; - char parity; guint stopbits; - guint64 send_delay; + char parity; } NMSettingSerialPrivate; G_DEFINE_TYPE (NMSettingSerial, nm_setting_serial, NM_TYPE_SETTING) @@ -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); |