tracker r1367 - in branches/indexer-split: . src/trackerd
- From: ifrade svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r1367 - in branches/indexer-split: . src/trackerd
- Date: Wed, 7 May 2008 18:25:20 +0100 (BST)
Author: ifrade
Date: Wed May 7 17:25:20 2008
New Revision: 1367
URL: http://svn.gnome.org/viewvc/tracker?rev=1367&view=rev
Log:
Removed DBConnection from ServiceTypeInfo
Modified:
branches/indexer-split/ChangeLog
branches/indexer-split/src/trackerd/tracker-db-sqlite.c
branches/indexer-split/src/trackerd/tracker-db-sqlite.h
branches/indexer-split/src/trackerd/tracker-db.c
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 Wed May 7 17:25:20 2008
@@ -80,7 +80,6 @@
typedef struct {
guint32 service_id;
int service_type_id;
- DBConnection *db_con;
} ServiceTypeInfo;
@@ -2082,7 +2081,7 @@
static void
-update_metadata_index (DBConnection *db_con, const char *id, const char *service, FieldDef *def, const char *old_value, const char *new_value)
+update_metadata_index (const char *id, const char *service, FieldDef *def, const char *old_value, const char *new_value)
{
GHashTable *old_table, *new_table;
gint sid;
@@ -2111,7 +2110,7 @@
/* we only do differential updates so only changed words scores are updated */
sid = tracker_service_manager_get_id_for_service (service);
- tracker_db_update_differential_index (db_con, old_table, new_table, id, sid);
+ tracker_db_update_differential_index (old_table, new_table, id, sid);
tracker_word_table_free (old_table);
tracker_word_table_free (new_table);
@@ -2737,10 +2736,10 @@
if (update_index) {
if (str) {
- update_metadata_index (db_con, id, res_service, def, old_value, str->str);
+ update_metadata_index (id, res_service, def, old_value, str->str);
g_string_free (str, TRUE);
} else {
- update_metadata_index (db_con, id, res_service, def, old_value, new_value);
+ update_metadata_index (id, res_service, def, old_value, new_value);
}
}
@@ -2905,7 +2904,7 @@
/* update fulltext index differentially with old and new values */
if (update_index) {
- update_metadata_index (db_con, id, service, def, old_value, new_value);
+ update_metadata_index (id, service, def, old_value, new_value);
}
g_free (new_value);
@@ -3001,7 +3000,7 @@
/* update fulltext index differentially with old values and NULL */
if (update_index && old_value) {
- update_metadata_index (db_con, id, service, def, old_value, " ");
+ update_metadata_index (id, service, def, old_value, " ");
}
@@ -4366,7 +4365,6 @@
info->service_id = service_id;
info->service_type_id = service_type_id;
- info->db_con = NULL;
g_hash_table_foreach (table, append_index_data, info);
g_slice_free (ServiceTypeInfo, info);
@@ -4401,7 +4399,7 @@
void
-tracker_db_update_differential_index (DBConnection *db_con, GHashTable *old_table, GHashTable *new_table, const char *id, int service_type_id)
+tracker_db_update_differential_index (GHashTable *old_table, GHashTable *new_table, const char *id, int service_type_id)
{
ServiceTypeInfo *info;
@@ -4420,7 +4418,6 @@
info->service_id = strtoul (id, NULL, 10);
info->service_type_id = service_type_id;
- info->db_con = db_con;
g_hash_table_foreach (new_table, update_index_data, info);
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 Wed May 7 17:25:20 2008
@@ -129,8 +129,7 @@
void tracker_db_update_indexes_for_new_service (guint32 service_id,
gint service_type_id,
GHashTable *table);
-void tracker_db_update_differential_index (DBConnection *db_con,
- GHashTable *old_table,
+void tracker_db_update_differential_index (GHashTable *old_table,
GHashTable *new_table,
const gchar *id,
gint service_type_id);
Modified: branches/indexer-split/src/trackerd/tracker-db.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-db.c (original)
+++ branches/indexer-split/src/trackerd/tracker-db.c Wed May 7 17:25:20 2008
@@ -999,7 +999,7 @@
if (info->is_new) {
tracker_db_update_indexes_for_new_service (info->file_id, info->service_type_id, index_table);
} else {
- tracker_db_update_differential_index (db_con, old_table, index_table, str_file_id, info->service_type_id);
+ tracker_db_update_differential_index (old_table, index_table, str_file_id, info->service_type_id);
}
tracker_word_table_free (index_table);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]