diff options
Diffstat (limited to 'src/up-device.c')
-rw-r--r-- | src/up-device.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/up-device.c b/src/up-device.c index b27852a..8483c6c 100644 --- a/src/up-device.c +++ b/src/up-device.c @@ -426,10 +426,13 @@ up_device_compute_object_path (UpDevice *device) void up_device_register (UpDevice *device) { - char *object_path = up_device_compute_object_path (device); - g_debug ("object path = %s", object_path); - up_device_export_skeleton (device, object_path); - g_free (object_path); + g_autofree char *computed_object_path = NULL; + + if (g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (device)) != NULL) + return; + computed_object_path = up_device_compute_object_path (device); + g_debug ("Exported UpDevice with path %s", computed_object_path); + up_device_export_skeleton (device, computed_object_path); } void |