tracker r2117 - in branches/indexer-split: . src/libtracker-common src/libtracker-db
- From: mr svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r2117 - in branches/indexer-split: . src/libtracker-common src/libtracker-db
- Date: Wed, 20 Aug 2008 15:31:20 +0000 (UTC)
Author: mr
Date: Wed Aug 20 15:31:20 2008
New Revision: 2117
URL: http://svn.gnome.org/viewvc/tracker?rev=2117&view=rev
Log:
* src/libtracker-common/tracker-dbus.c:
(tracker_dbus_request_failed): If error is already set and there
is no format, we do not set str which is used in a print statement
and then freed. This could lead to serious stack corruption.
* src/libtracker-db/tracker-db-index-manager.c:
(has_tmp_merge_files): Don't print a warning with an uninitialised
path string.
* src/libtracker-db/tracker-db-index.c:
(tracker_db_index_get_size): Actually return the size instead of
returning an uninitialised size variable.
* src/libtracker-db/tracker-db-interface-sqlite.c:
(create_result_set_from_stmt): Set the busy count instead of
incrementing random memory.
* src/libtracker-db/tracker-db-manager.c:
(load_service_file_xesam): If we can't map data id to a
TrackerFieldType, don't just use an uninitialised integer. Now we
use -1 and display a warning.
Modified:
branches/indexer-split/ChangeLog
branches/indexer-split/src/libtracker-common/tracker-dbus.c
branches/indexer-split/src/libtracker-db/tracker-db-index-manager.c
branches/indexer-split/src/libtracker-db/tracker-db-index.c
branches/indexer-split/src/libtracker-db/tracker-db-interface-sqlite.c
branches/indexer-split/src/libtracker-db/tracker-db-manager.c
Modified: branches/indexer-split/src/libtracker-common/tracker-dbus.c
==============================================================================
--- branches/indexer-split/src/libtracker-common/tracker-dbus.c (original)
+++ branches/indexer-split/src/libtracker-common/tracker-dbus.c Wed Aug 20 15:31:20 2008
@@ -300,11 +300,11 @@
va_end (args);
g_set_error (error, TRACKER_DBUS_ERROR, 0, str);
-
} else if (*error != NULL) {
str = g_strdup ((*error)->message);
} else {
- g_critical ("Unset error and no error message.");
+ str = g_strdup (_("No error given"));
+ g_warning ("Unset error and no error message.");
}
g_message ("---> [%d] Failed, %s",
Modified: branches/indexer-split/src/libtracker-db/tracker-db-index-manager.c
==============================================================================
--- branches/indexer-split/src/libtracker-db/tracker-db-index-manager.c (original)
+++ branches/indexer-split/src/libtracker-db/tracker-db-index-manager.c Wed Aug 20 15:31:20 2008
@@ -68,7 +68,6 @@
GFileInfo *info;
GError *error = NULL;
gchar *prefix;
- const gchar *data_dir;
gchar *dirname;
gboolean found;
@@ -117,8 +116,7 @@
if (error) {
g_warning ("Could not get file information for temporary "
- "index files in directory:'%s', %s",
- data_dir,
+ "index files, %s",
error->message);
g_error_free (error);
}
Modified: branches/indexer-split/src/libtracker-db/tracker-db-index.c
==============================================================================
--- branches/indexer-split/src/libtracker-db/tracker-db-index.c (original)
+++ branches/indexer-split/src/libtracker-db/tracker-db-index.c Wed Aug 20 15:31:20 2008
@@ -871,7 +871,7 @@
tracker_db_index_get_size (TrackerDBIndex *index)
{
TrackerDBIndexPrivate *priv;
- guint32 size;
+ guint32 size;
g_return_val_if_fail (TRACKER_IS_DB_INDEX (index), 0);
@@ -882,7 +882,7 @@
priv = TRACKER_DB_INDEX_GET_PRIVATE (index);
g_mutex_lock (priv->mutex);
- dpfsiz (priv->index);
+ size = dpfsiz (priv->index);
g_mutex_unlock (priv->mutex);
return size;
Modified: branches/indexer-split/src/libtracker-db/tracker-db-interface-sqlite.c
==============================================================================
--- branches/indexer-split/src/libtracker-db/tracker-db-interface-sqlite.c (original)
+++ branches/indexer-split/src/libtracker-db/tracker-db-interface-sqlite.c Wed Aug 20 15:31:20 2008
@@ -352,6 +352,7 @@
priv = TRACKER_DB_INTERFACE_SQLITE_GET_PRIVATE (interface);
columns = sqlite3_column_count (stmt);
result = SQLITE_OK;
+ busy_count = 0;
while (result == SQLITE_OK ||
result == SQLITE_ROW ||
Modified: branches/indexer-split/src/libtracker-db/tracker-db-manager.c
==============================================================================
--- branches/indexer-split/src/libtracker-db/tracker-db-manager.c (original)
+++ branches/indexer-split/src/libtracker-db/tracker-db-manager.c Wed Aug 20 15:31:20 2008
@@ -714,9 +714,15 @@
gint mapped_data_id;
gboolean list = FALSE;
- /* We map these values to existing field types.
- FIXME Eventually we should change the config file instead. */
-
+ /* We map these values
+ * to existing field
+ * types. FIXME
+ * Eventually we
+ * should change the
+ * config file
+ * instead.
+ */
+
switch (data_id) {
case 0:
mapped_data_id = TRACKER_FIELD_TYPE_STRING;
@@ -739,6 +745,9 @@
list = TRUE;
mapped_data_id = TRACKER_FIELD_TYPE_STRING;
break;
+ default:
+ g_warning ("Couldn't map data id %d to TrackerFieldType");
+ mapped_data_id = -1;
}
sql = g_strdup_printf ("update XesamMetadataTypes set DataTypeID = %d where ID = %s",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]