diff options
| author | Michael Biebl <biebl@debian.org> | 2020-04-11 21:28:04 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2020-04-11 21:28:04 +0200 |
| commit | 1e5977b62f896e844b548c3007ace9e1dfa7f9ed (patch) | |
| tree | 7a7416ed410e72b6200f3d860fd315ec11cc106b /libnm-core/nm-setting-serial.c | |
| parent | b012fa6e1d808e0736c009799c62d835cbfcc1dd (diff) | |
New upstream version 1.23.90 upstream/1.23.90
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); |