syncevolution/src/dbus
Patrick Ohly f7718ebb48 D-Bus server + GIO D-Bus: fix auto-activation (Debian bug #599247)
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.
2012-08-13 22:17:38 +02:00
..
glib GTK UI: commented resp. removed dead code 2011-11-30 08:43:57 +00:00
interfaces D-Bus interface XML: fix incorrect numbering of parameter annotation in Session.SetNamedConfig() 2012-07-29 11:39:02 +02:00
qt autotools: include missing src/dbus/qt/configure-sub.in 2012-01-11 16:10:08 +01:00
server D-Bus server + GIO D-Bus: fix auto-activation (Debian bug #599247) 2012-08-13 22:17:38 +02:00
dbus.am Port build system to non-recursive Automake. 2011-08-30 16:38:34 +02:00