summaryrefslogtreecommitdiff
path: root/src/libtracker-sparql-backend
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2017-06-04 18:40:03 +0200
committerCarlos Garnacho <carlosg@gnome.org>2017-06-29 19:52:49 +0200
commitcc259d53520a863f46f96191ff20d64d27e2f724 (patch)
treea8f40891f05da9f79ba6d505ef1bc78da5215ab0 /src/libtracker-sparql-backend
parentc1c10355ff5a2fb8761c7289a7828678c7ff13ff (diff)
downloadtracker-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-sparql-backend')
-rw-r--r--src/libtracker-sparql-backend/tracker-backend.vala33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/libtracker-sparql-backend/tracker-backend.vala b/src/libtracker-sparql-backend/tracker-backend.vala
index 4d176abef..8d3c7dbba 100644
--- a/src/libtracker-sparql-backend/tracker-backend.vala
+++ b/src/libtracker-sparql-backend/tracker-backend.vala
@@ -26,27 +26,10 @@ class Tracker.Sparql.Backend : Connection {
DIRECT,
BUS
}
- GLib.BusType bus_type = BusType.SESSION;
public Backend () throws Sparql.Error, IOError, DBusError, SpawnError {
try {
- // Important to make sure we check the right bus for the store
- load_env ();
-
- // Makes sure the sevice is available
- debug ("Waiting for service to become available...");
-
- // do not use proxy to work around race condition in GDBus
- // NB#259760
- var bus = GLib.Bus.get_sync (bus_type);
- 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");
-
- debug ("Constructing connection");
load_plugins ();
- debug ("Backend is ready");
} catch (GLib.Error e) {
throw new Sparql.Error.INTERNAL (e.message);
}
@@ -54,22 +37,6 @@ class Tracker.Sparql.Backend : Connection {
initialized = true;
}
- private void load_env () {
- string env_bus_type = Environment.get_variable ("TRACKER_BUS_TYPE");
-
- if (env_bus_type != null) {
- if (env_bus_type.ascii_casecmp ("system") == 0) {
- bus_type = BusType.SYSTEM;
- debug ("Using bus = 'SYSTEM'");
- } else if (env_bus_type.ascii_casecmp ("session") == 0) {
- bus_type = BusType.SESSION;
- debug ("Using bus = 'SESSION'");
- } else {
- warning ("Environment variable TRACKER_BUS_TYPE set to unknown value '%s'", env_bus_type);
- }
- }
- }
-
public override void dispose () {
// trying to lock on partially initialized instances will deadlock
if (initialized) {