From bdd9bb53689262efb2516024b810a30a6803d335 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 16 Sep 2019 08:40:42 +0100 Subject: [PATCH] GsdSmartcardService: Use correct parent type for structs GDBusObjectSkeleton objects are larger than GObject, so we need to allocate enough space. Otherwise, if we're lucky we'll get: Sep 13 11:09:32 espresso gsd-smartcard[12882]: specified class size for type 'GsdSmartcardService' is smaller than the parent type's 'GsdSmartcardServiceManagerSkeleton' class size Sep 13 11:09:32 espresso gsd-smartcard[12882]: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed and if we're unlucky we'll get object fields overwriting each other. Signed-off-by: Simon McVittie Fixes: 76b6b794 "smartcard: Use G_DECLARE_FINAL_TYPE for GsdSmartcardService" (cherry picked from commit 1b31868c23feb556b6b9abb9e922a77a24ac451b) --- plugins/smartcard/gsd-smartcard-service.c | 2 +- plugins/smartcard/gsd-smartcard-service.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/smartcard/gsd-smartcard-service.c b/plugins/smartcard/gsd-smartcard-service.c index 783624f6..4d529c30 100644 --- a/plugins/smartcard/gsd-smartcard-service.c +++ b/plugins/smartcard/gsd-smartcard-service.c @@ -32,7 +32,7 @@ struct _GsdSmartcardService { - GObject parent; + GsdSmartcardServiceManagerSkeleton parent; GDBusConnection *bus_connection; GDBusObjectManagerServer *object_manager_server; diff --git a/plugins/smartcard/gsd-smartcard-service.h b/plugins/smartcard/gsd-smartcard-service.h index cf071fdc..11b3e222 100644 --- a/plugins/smartcard/gsd-smartcard-service.h +++ b/plugins/smartcard/gsd-smartcard-service.h @@ -39,7 +39,7 @@ G_BEGIN_DECLS #define GSD_TYPE_SMARTCARD_SERVICE (gsd_smartcard_service_get_type ()) -G_DECLARE_FINAL_TYPE (GsdSmartcardService, gsd_smartcard_service, GSD, SMARTCARD_SERVICE, GObject) +G_DECLARE_FINAL_TYPE (GsdSmartcardService, gsd_smartcard_service, GSD, SMARTCARD_SERVICE, GsdSmartcardServiceManagerSkeleton) void gsd_smartcard_service_new_async (GsdSmartcardManager *manager, GCancellable *cancellable, -- 2.23.0