[tracker/async-queries-due] libtracker-db: Shutdown FTS in all threads before DB interface shutdown
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/async-queries-due] libtracker-db: Shutdown FTS in all threads before DB interface shutdown
- Date: Fri, 16 Apr 2010 16:02:02 +0000 (UTC)
commit 7f55942771059d0f5909e50115864de82c813438
Author: Jürg Billeter <j bitron ch>
Date: Fri Apr 16 18:00:05 2010 +0200
libtracker-db: Shutdown FTS in all threads before DB interface shutdown
src/libtracker-db/tracker-db-manager.c | 5 +++++
src/libtracker-fts/tracker-fts.c | 4 ++++
src/libtracker-fts/tracker-fts.h | 1 +
3 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-db/tracker-db-manager.c b/src/libtracker-db/tracker-db-manager.c
index 9641d28..894a718 100644
--- a/src/libtracker-db/tracker-db-manager.c
+++ b/src/libtracker-db/tracker-db-manager.c
@@ -949,6 +949,11 @@ tracker_db_manager_shutdown (void)
sys_tmp_dir = NULL;
g_free (sql_dir);
+ /* shutdown fts in all threads
+ needs to be done before shutting down all db interfaces as
+ shutdown does not happen in thread where interface was created */
+ tracker_fts_shutdown_all ();
+ /* shutdown db interfaces in all threads */
g_static_private_free (&interface_data_key);
if (thread_ifaces) {
diff --git a/src/libtracker-fts/tracker-fts.c b/src/libtracker-fts/tracker-fts.c
index 18ef56c..857b3f8 100644
--- a/src/libtracker-fts/tracker-fts.c
+++ b/src/libtracker-fts/tracker-fts.c
@@ -7831,6 +7831,10 @@ void tracker_fts_shutdown (void){
g_static_private_set (&tracker_fts_vtab_key, NULL, NULL);
}
+void tracker_fts_shutdown_all (void){
+ g_static_private_free (&tracker_fts_vtab_key);
+}
+
void tracker_fts_set_map_function(TrackerFtsMapFunc map_func){
map_function = map_func;
}
diff --git a/src/libtracker-fts/tracker-fts.h b/src/libtracker-fts/tracker-fts.h
index e8e2adc..2ed6caf 100644
--- a/src/libtracker-fts/tracker-fts.h
+++ b/src/libtracker-fts/tracker-fts.h
@@ -26,6 +26,7 @@ typedef const gchar *(*TrackerFtsMapFunc) (gint id);
int tracker_fts_init (sqlite3 *db, int create);
void tracker_fts_shutdown (void);
+void tracker_fts_shutdown_all (void);
void tracker_fts_set_map_function (TrackerFtsMapFunc map_func);
int tracker_fts_update_init (int id);
int tracker_fts_update_text (int id, int column_id, const char *text, gboolean limit_word_length);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]