Commit 59b50920 authored by Jürg Billeter's avatar Jürg Billeter

libtracker-sparql: Wait for tracker-store before loading plugins

parent 9fb85028
......@@ -25,6 +25,8 @@ interface Tracker.Backend.Status : DBusProxy {
}
class Tracker.Sparql.Backend : Connection {
bool direct_only;
static bool is_constructed = false;
static bool is_initialized = false;
static Tracker.Sparql.Connection direct = null;
......@@ -47,12 +49,7 @@ class Tracker.Sparql.Backend : Connection {
return;
}
try {
debug ("Constructing connection, direct_only=%s", direct_only ? "true" : "false");
load_plugins (direct_only);
} catch (GLib.Error e) {
throw new Sparql.Error.INTERNAL (e.message);
}
this.direct_only = direct_only;
is_constructed = true;
}
......@@ -70,6 +67,13 @@ class Tracker.Sparql.Backend : Connection {
status.wait ();
debug ("Service is ready");
try {
debug ("Constructing connection, direct_only=%s", direct_only ? "true" : "false");
load_plugins (direct_only);
} catch (GLib.Error e) {
throw new Sparql.Error.INTERNAL (e.message);
}
is_initialized = true;
}
......@@ -86,6 +90,13 @@ class Tracker.Sparql.Backend : Connection {
yield status.wait_async ();
debug ("Service is ready");
try {
debug ("Constructing connection, direct_only=%s", direct_only ? "true" : "false");
load_plugins (direct_only);
} catch (GLib.Error e) {
throw new Sparql.Error.INTERNAL (e.message);
}
is_initialized = true;
}
......
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