diff options
author | Guido Günther <agx@sigxcpu.org> | 2025-05-20 17:43:59 +0200 |
---|---|---|
committer | Dan Williams <dan@ioncontrol.co> | 2025-05-22 08:09:56 -0500 |
commit | 382c3e114c1f53c07aa7756eb06ee6a24f53c918 (patch) | |
tree | 49db15d3544a571c9bab8825e428a7e658be5311 | |
parent | 7ae153880c75f89dc6427b234d85c57717bb8df3 (diff) |
base-cbm: Install properties one by one
`g_object_class_install_property` picks up `PROP_BIND_TO` resulting in a
crash on the first CBM received.
Fixes: ec5104c9a ("Move log parent and connection property binding to helper")
Signed-off-by: Guido Günther <agx@sigxcpu.org>
-rw-r--r-- | src/mm-base-cbm.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mm-base-cbm.c b/src/mm-base-cbm.c index 59b9e49a..fe566882 100644 --- a/src/mm-base-cbm.c +++ b/src/mm-base-cbm.c @@ -520,6 +520,7 @@ mm_base_cbm_class_init (MMBaseCbmClass *klass) "GDBus connection to the system bus.", G_TYPE_DBUS_CONNECTION, G_PARAM_READWRITE); + g_object_class_install_property (object_class, PROP_CONNECTION, properties[PROP_CONNECTION]); properties[PROP_PATH] = g_param_spec_string (MM_BASE_CBM_PATH, @@ -527,6 +528,7 @@ mm_base_cbm_class_init (MMBaseCbmClass *klass) "DBus path of the CBM", NULL, G_PARAM_READWRITE); + g_object_class_install_property (object_class, PROP_PATH, properties[PROP_PATH]); g_object_class_override_property (object_class, PROP_BIND_TO, MM_BIND_TO); @@ -536,6 +538,7 @@ mm_base_cbm_class_init (MMBaseCbmClass *klass) "Maximum number of parts composing this CBM", 1, 255, 1, G_PARAM_READWRITE); + g_object_class_install_property (object_class, PROP_MAX_PARTS, properties[PROP_MAX_PARTS]); properties[PROP_SERIAL] = g_param_spec_uint (MM_BASE_CBM_SERIAL, @@ -543,8 +546,7 @@ mm_base_cbm_class_init (MMBaseCbmClass *klass) "The serial of this CBM", 0, G_MAXUINT16, 0, G_PARAM_READWRITE); - - g_object_class_install_properties (object_class, PROP_LAST, properties); + g_object_class_install_property (object_class, PROP_SERIAL, properties[PROP_SERIAL]); } guint16 |