tracker r3079 - in trunk: . src/libtracker-data src/trackerd
- From: mr svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r3079 - in trunk: . src/libtracker-data src/trackerd
- Date: Fri, 13 Mar 2009 14:54:12 +0000 (UTC)
Author: mr
Date: Fri Mar 13 14:54:11 2009
New Revision: 3079
URL: http://svn.gnome.org/viewvc/tracker?rev=3079&view=rev
Log:
* src/libtracker-data/tracker-data-update.c:
(tracker_data_update_reset_volume): Make sure we convert the
volume id into a string before using it in the stored procedure,
was crashing.
* src/trackerd/tracker-volume-cleanup.c:
(check_for_volumes_to_cleanup): Small clean ups trying to find a
crash.
Modified:
trunk/ChangeLog
trunk/src/libtracker-data/tracker-data-update.c
trunk/src/trackerd/tracker-volume-cleanup.c
Modified: trunk/src/libtracker-data/tracker-data-update.c
==============================================================================
--- trunk/src/libtracker-data/tracker-data-update.c (original)
+++ trunk/src/libtracker-data/tracker-data-update.c Fri Mar 13 14:54:11 2009
@@ -736,7 +736,9 @@
iis_value = g_value_get_int (&is_value);
if (iis_value) {
- ForeachInMetadataInfo *info = g_slice_new (ForeachInMetadataInfo);
+ ForeachInMetadataInfo *info;
+
+ info = g_slice_new (ForeachInMetadataInfo);
info->service = service;
info->iid_value = iid_value;
@@ -755,7 +757,7 @@
g_object_unref (result_set);
} else {
- guint32 id;
+ guint32 id;
id = tracker_data_update_get_new_service_id (iface);
@@ -828,16 +830,21 @@
tracker_data_update_reset_volume (guint32 volume_id)
{
TrackerDBInterface *iface;
+ gchar *volume_id_str;
+
+ /* NOTE: The default volume id 0 is not to be changed */
+ g_return_if_fail (volume_id > 1);
iface = tracker_db_manager_get_db_interface (TRACKER_DB_COMMON);
+ volume_id_str = tracker_guint32_to_string (volume_id);
tracker_db_interface_execute_procedure (iface, NULL,
"UpdateVolumeDisabledDate",
- volume_id,
+ volume_id_str,
NULL);
+ g_free (volume_id_str);
}
-
void
tracker_data_update_disable_volume (const gchar *udi)
{
Modified: trunk/src/trackerd/tracker-volume-cleanup.c
==============================================================================
--- trunk/src/trackerd/tracker-volume-cleanup.c (original)
+++ trunk/src/trackerd/tracker-volume-cleanup.c Fri Mar 13 14:54:11 2009
@@ -80,11 +80,10 @@
while (is_valid) {
GValue value = { 0, };
- GValue idvalue = { 0, };
const gchar *mount_point_path;
+ gint volume_id;
_tracker_db_result_set_get_value (result_set, 0, &value);
- _tracker_db_result_set_get_value (result_set, 1, &idvalue);
mount_point_path = g_value_get_string (&value);
@@ -104,10 +103,15 @@
g_object_unref (file);
}
- tracker_data_update_reset_volume ((guint32) g_value_get_int (&idvalue));
+ g_value_unset (&value);
+
+ /* Reset volume date */
+ _tracker_db_result_set_get_value (result_set, 1, &value);
+
+ volume_id = g_value_get_int (&value);
+ tracker_data_update_reset_volume (volume_id);
g_value_unset (&value);
- g_value_unset (&idvalue);
is_valid = tracker_db_result_set_iter_next (result_set);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]