When syncevo-dbus-server was started on demand by the D-Bus daemon, then it registered itself with the daemon before it was ready to serve requests. Only happened in combination with GIO D-Bus and thus was not a problem before 1.2.99.x. One user-visible effect was that the GTK UI did select the default service when it was started for the first time, because it could not retrieve that information from syncevo-dbus-server. The fix consists of delaying the name acquisition. That gives the caller a chance to register D-Bus objects first, before completing the connection setup. The semantic change is that dbus_bus_connection_undelay() must be called on new connections which have a name (a NOP with libdbus). This patch tries to minimize code changes. The downside of not changing the GDBusCXX API more radically is that the bus name must be attached to DBusConnectionPtr, where it will be copied into each reference to the connection. Hopefully std::string is smart enough to share the (small) data in this case. Should be solved cleaner once libdbus support can be deprecated. A test for auto-activation and double start of syncevo-dbus-server is also added. |
||
---|---|---|
.. | ||
glib | ||
interfaces | ||
qt | ||
server | ||
dbus.am |