Commit 413ae515 authored by Philip Withnall's avatar Philip Withnall

Use get_object_for_name_owner() rather than just get_object()

This makes the Logger proxy more robust against the Logger service going
away.
parent a5756034
......@@ -58,9 +58,13 @@ internal class Logger : GLib.Object
/* Create a logger proxy for favourites support */
/* FIXME: This should be ported to the Vala GDBus stuff and made
* async, but that depends on
* https://bugzilla.gnome.org/show_bug.cgi?id=622611 being fixed. */
* https://bugzilla.gnome.org/show_bug.cgi?id=622611 being fixed.
* FIXME: If this is made async, race conditions may appear in
* TpfPersonaStore, which will need to be prevented. e.g.
* change_is_favourite() may get called before logger initialisation
* is complete; favourites-change requests should be queued. */
var dbus_conn = DBus.Bus.get (DBus.BusType.SESSION);
this.logger = dbus_conn.get_object (
this.logger = dbus_conn.get_object_for_name_owner (
"org.freedesktop.Telepathy.Logger",
"/org/freedesktop/Telepathy/Logger",
"org.freedesktop.Telepathy.Logger.DRAFT") as LoggerIface;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment