[tracker] tracker-store: Fixed regression for class-signals caused by busy-handling



commit d3df76bca097f3a88d0da52afd8a96df9b58acde
Author: Philip Van Hoof <philip codeminded be>
Date:   Thu Aug 5 10:41:39 2010 +0200

    tracker-store: Fixed regression for class-signals caused by busy-handling

 src/tracker-store/tracker-dbus.c |   22 +++++++++++++++++++---
 src/tracker-store/tracker-dbus.h |   13 +++++++------
 src/tracker-store/tracker-main.c |    2 ++
 3 files changed, 28 insertions(+), 9 deletions(-)
---
diff --git a/src/tracker-store/tracker-dbus.c b/src/tracker-store/tracker-dbus.c
index d2f2e01..201cdbc 100644
--- a/src/tracker-store/tracker-dbus.c
+++ b/src/tracker-store/tracker-dbus.c
@@ -251,9 +251,6 @@ tracker_dbus_register_notifier (void)
 gboolean
 tracker_dbus_register_objects (void)
 {
-	TrackerDBResultSet *result_set;
-	GSList *event_sources = NULL;
-	GStrv classes, p;
 	gpointer object, resources;
 
 	if (!connection || !gproxy) {
@@ -330,6 +327,25 @@ tracker_dbus_register_objects (void)
 		 * work correctly from the dbus call otherwise */
 	}
 
+	return TRUE;
+	
+}
+
+gboolean
+tracker_dbus_register_class_signal_objects (void)
+{
+	TrackerDBResultSet *result_set;
+	GSList *event_sources = NULL;
+	GStrv classes, p;
+	gpointer object, resources;
+
+	resources = tracker_dbus_get_object (TRACKER_TYPE_RESOURCES);
+
+	if (!resources) {
+		g_message ("Error during initialization, Resources DBus object not available");
+		return TRUE;
+	}
+
 	result_set = tracker_data_query_sparql ("SELECT ?class WHERE { ?class tracker:notify true }", NULL);
 
 	if (!result_set) {
diff --git a/src/tracker-store/tracker-dbus.h b/src/tracker-store/tracker-dbus.h
index fb0d430..b5007b6 100644
--- a/src/tracker-store/tracker-dbus.h
+++ b/src/tracker-store/tracker-dbus.h
@@ -29,12 +29,13 @@
 
 G_BEGIN_DECLS
 
-gboolean        tracker_dbus_init                    (void);
-void            tracker_dbus_shutdown                (void);
-gboolean        tracker_dbus_register_objects        (void);
-GObject        *tracker_dbus_get_object              (GType type);
-TrackerStatus  *tracker_dbus_register_notifier       (void);
-gboolean        tracker_dbus_register_names          (void);
+gboolean        tracker_dbus_init                          (void);
+void            tracker_dbus_shutdown                      (void);
+gboolean        tracker_dbus_register_objects              (void);
+GObject        *tracker_dbus_get_object                    (GType type);
+TrackerStatus  *tracker_dbus_register_notifier             (void);
+gboolean        tracker_dbus_register_names                (void);
+gboolean        tracker_dbus_register_class_signal_objects (void);
 
 G_END_DECLS
 
diff --git a/src/tracker-store/tracker-main.c b/src/tracker-store/tracker-main.c
index ffebfc9..224f911 100644
--- a/src/tracker-store/tracker-main.c
+++ b/src/tracker-store/tracker-main.c
@@ -495,6 +495,8 @@ main (gint argc, gchar *argv[])
 		goto shutdown;
 	}
 
+	tracker_dbus_register_class_signal_objects ();
+
 	tracker_events_init (get_notifiable_classes);
 	tracker_writeback_init (get_writeback_predicates);
 



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