diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2017-06-04 18:40:03 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2017-06-29 19:52:49 +0200 |
commit | cc259d53520a863f46f96191ff20d64d27e2f724 (patch) | |
tree | a8f40891f05da9f79ba6d505ef1bc78da5215ab0 /src/libtracker-bus | |
parent | c1c10355ff5a2fb8761c7289a7828678c7ff13ff (diff) | |
download | tracker-cc259d53520a863f46f96191ff20d64d27e2f724.tar.gz |
libtracker-bus: Move tracker-store ping call here
We just need this if we have a bus-based connection at all.
Diffstat (limited to 'src/libtracker-bus')
-rw-r--r-- | src/libtracker-bus/tracker-bus.vala | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libtracker-bus/tracker-bus.vala b/src/libtracker-bus/tracker-bus.vala index 527a9e181..d254dd57a 100644 --- a/src/libtracker-bus/tracker-bus.vala +++ b/src/libtracker-bus/tracker-bus.vala @@ -20,9 +20,18 @@ public class Tracker.Bus.Connection : Tracker.Sparql.Connection { DBusConnection bus; - public Connection () throws Sparql.Error, IOError, DBusError { + public Connection () throws Sparql.Error, IOError, DBusError, GLib.Error { bus = GLib.Bus.get_sync (Tracker.IPC.bus ()); + debug ("Waiting for service to become available..."); + + // do not use proxy to work around race condition in GDBus + // NB#259760 + var msg = new DBusMessage.method_call (Tracker.DBUS_SERVICE, Tracker.DBUS_OBJECT_STATUS, Tracker.DBUS_INTERFACE_STATUS, "Wait"); + bus.send_message_with_reply_sync (msg, 0, /* timeout */ int.MAX, null).to_gerror (); + + debug ("Service is ready"); + // ensure that error domain is registered with GDBus new Sparql.Error.INTERNAL (""); } |