tracker r1371 - branches/indexer-split/src/trackerd



Author: pvanhoof
Date: Thu May  8 11:09:16 2008
New Revision: 1371
URL: http://svn.gnome.org/viewvc/tracker?rev=1371&view=rev

Log:
Bugfix in xesam's getevents

Modified:
   branches/indexer-split/src/trackerd/tracker-db-sqlite.c
   branches/indexer-split/src/trackerd/tracker-db-sqlite.h

Modified: branches/indexer-split/src/trackerd/tracker-db-sqlite.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-db-sqlite.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-db-sqlite.c	Thu May  8 11:09:16 2008
@@ -3081,7 +3081,7 @@
 TrackerDBResultSet* 
 tracker_db_get_events (DBConnection *db_con)
 {
-	TrackerDBResultSet *result_set, *result;
+	TrackerDBResultSet *result;
 
 	/* This happens in the GMainLoop */
 	g_static_rec_mutex_lock (&events_table_lock);
@@ -3089,16 +3089,22 @@
 	/* Uses the Events table */
 	tracker_debug ("GetEvents");
 	result = tracker_exec_proc (db_con->common, "GetEvents", NULL);
-	tracker_debug ("SetEventsBeingHandled");
-	result_set = tracker_exec_proc (db_con->common, "SetEventsBeingHandled", NULL);
-	if (result_set)
-		g_object_unref (result_set);
 	g_static_rec_mutex_unlock (&events_table_lock);
-
 	return result;
 }
 
 void 
+tracker_db_set_events_handled (DBConnection *db_con)
+{
+	/* This happens in the GMainLoop */
+	g_static_rec_mutex_lock (&events_table_lock);
+	/* Uses the Events table */
+	tracker_debug ("SetEventsBeingHandled");
+	tracker_exec_proc_no_reply (db_con->common, "SetEventsBeingHandled", NULL);
+	g_static_rec_mutex_unlock (&events_table_lock);
+}
+
+void 
 tracker_db_delete_handled_events (DBConnection *db_con, TrackerDBResultSet *events)
 {
 	TrackerDBResultSet *result_set;

Modified: branches/indexer-split/src/trackerd/tracker-db-sqlite.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-db-sqlite.h	(original)
+++ branches/indexer-split/src/trackerd/tracker-db-sqlite.h	Thu May  8 11:09:16 2008
@@ -354,6 +354,7 @@
 TrackerDBResultSet *tracker_db_get_events                      (DBConnection *db_con);
 void                tracker_db_delete_handled_events           (DBConnection   *db_con, 
                                                                 TrackerDBResultSet *events);
+void                tracker_db_set_events_handled              (DBConnection *db_con);
 TrackerDBResultSet *tracker_db_get_live_search_modified_ids    (DBConnection *db_con, 
                                                                 const gchar *search_id);
 TrackerDBResultSet *tracker_db_get_live_search_new_ids         (DBConnection *db_con, 



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