Re: [Tracker] Merging Turtle branch to Trunk
- From: Ivan Frade <ivan frade nokia com>
- To: ext Philip Van Hoof <spam pvanhoof be>
- Cc: Tracker mailing list <tracker-list gnome org>
- Subject: Re: [Tracker] Merging Turtle branch to Trunk
- Date: Tue, 16 Dec 2008 16:30:54 +0200
Hi!
#13. Is this a leak, looks like only str is freed, not service_type in
the if (!field):
+ gchar *str = NULL;
+ gchar *uri;
+ gchar *service_type;
+
+ g_value_init (&transform, G_TYPE_STRING);
+
+ tracker_db_result_set_get (result_set, 0, &uri, -1);
+ tracker_db_result_set_get (result_set, 1, &service_type, -1);
+ tracker_db_result_set_get (result_set, 2, &metadata_id, -1);
+ tracker_db_result_set_get (result_set, 3, &str, -1);
+
+ field = tracker_ontology_get_field_by_id (metadata_id);
+ if (!field) {
+ g_critical ("Field id %d in database but not in tracker-ontology",
+ metadata_id);
+ g_free (str);
+ return;
+ }
Ivan will fix this
Fixed. Indeed, "uri" was also leaking.
#15. The || condition should be on the right here, also, this whole code
block would be nicer in another function I think - which I commented on
in my previous mail.
+ if (flags & TRACKER_DB_MANAGER_FORCE_REINDEX
+ || g_file_test (get_ttl_backup_filename, G_FILE_TEST_EXISTS)) {
Ivan will fix this
Fixed. Moved the backup save and restore code to two new functions:
backup_user_metadata
backup_restore_on_crawling_finished
and the logic looks like:
if (force_reindex) {
backup_user_metadata (config, language);
flags |= TRACKER_DB_MANAGER_FORCE_REINDEX;
index_flags |= TRACKER_DB_INDEX_MANAGER_FORCE_REINDEX;
}
...
if (flags & TRACKER_DB_MANAGER_FORCE_REINDEX ||
g_file_test (get_ttl_backup_filename (),
G_FILE_TEST_EXISTS)) {
backup_restore_on_crawling_finished (private->processor);
}
Other than that, good work guys. I think we should try to get this
commit this week!
Thanks for the review,
Ivan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]