[tracker] libtracker-sparql: Wait for tracker-store before loading plugins
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-sparql: Wait for tracker-store before loading plugins
- Date: Mon, 13 Dec 2010 17:55:44 +0000 (UTC)
commit 59b50920db7927a30376ba82d5478354d3a4de2d
Author: Jürg Billeter <j bitron ch>
Date: Mon Dec 13 18:43:54 2010 +0100
libtracker-sparql: Wait for tracker-store before loading plugins
src/libtracker-sparql/tracker-backend.vala | 23 +++++++++++++++++------
1 files changed, 17 insertions(+), 6 deletions(-)
---
diff --git a/src/libtracker-sparql/tracker-backend.vala b/src/libtracker-sparql/tracker-backend.vala
index f21621f..1fe94fa 100644
--- a/src/libtracker-sparql/tracker-backend.vala
+++ b/src/libtracker-sparql/tracker-backend.vala
@@ -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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]