After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 758393 - gdbusobjectmanagerserver does not allow exporting itself
gdbusobjectmanagerserver does not allow exporting itself
Status: RESOLVED NOTABUG
Product: glib
Classification: Platform
Component: gio
2.47.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2015-11-20 12:55 UTC by Jonas Holmberg
Modified: 2016-01-11 16:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gdbusobjectmanagerserver: allow exporting itself (1.61 KB, patch)
2015-11-20 12:55 UTC, Jonas Holmberg
none Details | Review

Description Jonas Holmberg 2015-11-20 12:55:18 UTC
Created attachment 315967 [details] [review]
gdbusobjectmanagerserver: allow exporting itself

It is not possible to implement an object manager that exports itself and adds it's own path to the managed objects due to an assert in g_dbus_object_manager_server_export_unlocked().
Comment 1 Jonas Holmberg 2015-11-20 13:04:08 UTC
Long version: I ran into this problem when trying to implement a bluez gatt service using gdbus in gio (not to be confused with gdbus in bluez). According to https://kernel.googlesource.com/pub/scm/bluetooth/bluez/+/5.36/doc/gatt-api.txt#274 the path of the object that implements org.bluez.GattService1 and org.freedesktop.DBus.ObjectManager must be one of the objects the are returned when calling org.freedesktop.DBus.ObjectManager.GetManagedObjects otherwise the service will not be accepted by org.bluez.GattManager1.RegisterService (https://kernel.googlesource.com/pub/scm/bluetooth/bluez/+/5.36/doc/gatt-api.txt#312).
Comment 2 Jonas Holmberg 2016-01-11 16:06:58 UTC
It turned out to be a design error in the BlueZ D-Bus API, which has been fixed now:

http://git.kernel.org/cgit/bluetooth/bluez.git/commit/?id=c19813c95ea1eaa990f478b3004db9c1c03632dc