[tracker/wip/carlosg/test] Revert "libtracker-bus: Avoid pinging tracker-store on initialization"



commit a7203b09fb7299118c0869452e06213b7f85126a
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun Nov 11 16:41:19 2018 +0100

    Revert "libtracker-bus: Avoid pinging tracker-store on initialization"
    
    This reverts commit 56232b47ca2659ee1bc2483501cc13108cdfa840.

 src/libtracker-bus/tracker-bus.vala | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/src/libtracker-bus/tracker-bus.vala b/src/libtracker-bus/tracker-bus.vala
index c387680c3..3b971d030 100644
--- a/src/libtracker-bus/tracker-bus.vala
+++ b/src/libtracker-bus/tracker-bus.vala
@@ -29,6 +29,15 @@ public class Tracker.Bus.Connection : Tracker.Sparql.Connection {
                else
                        bus = dbus_connection;
 
+               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 (dbus_name, 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 ("");
        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]