[tracker/initable-db-iface] Squash some more
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/initable-db-iface] Squash some more
- Date: Thu, 3 Feb 2011 13:21:49 +0000 (UTC)
commit c5e4594bd7ca8a33282b46248b43167dab6ff0b7
Author: Philip Van Hoof <philip codeminded be>
Date: Thu Feb 3 14:21:27 2011 +0100
Squash some more
src/libtracker-data/tracker-db-manager.c | 8 ++++----
src/libtracker-sparql/tracker-backend.vala | 5 -----
2 files changed, 4 insertions(+), 9 deletions(-)
---
diff --git a/src/libtracker-data/tracker-db-manager.c b/src/libtracker-data/tracker-db-manager.c
index 2997b50..0c80583 100644
--- a/src/libtracker-data/tracker-db-manager.c
+++ b/src/libtracker-data/tracker-db-manager.c
@@ -702,7 +702,7 @@ db_recreate_all (GError **error)
if (internal_error) {
guint y;
- for (y = 0; y < i - 1; y++) {
+ for (y = 1; y < i; y++) {
g_object_unref (dbs[y].iface);
dbs[y].iface = NULL;
}
@@ -833,6 +833,7 @@ tracker_db_manager_init (TrackerDBManagerFlags flags,
"tracker",
NULL);
+ g_free (in_use_filename);
in_use_filename = g_build_filename (g_get_user_data_dir (),
"tracker",
"data",
@@ -899,7 +900,7 @@ tracker_db_manager_init (TrackerDBManagerFlags flags,
TRACKER_DB_OPEN_ERROR,
"Could not find database file:'%s'. One or more database files are missing", dbs[i].abs_filename);
- for (y = 0; y < i - 1; y++) {
+ for (y = 1; y <= i; y++) {
g_free (dbs[y].abs_filename);
dbs[y].abs_filename = NULL;
}
@@ -1019,13 +1020,12 @@ tracker_db_manager_init (TrackerDBManagerFlags flags,
if (internal_error) {
guint y;
- for (y = 0; y < i - 1; y++) {
+ for (y = 1; y < i; y++) {
g_object_unref (dbs[y].iface);
dbs[y].iface = NULL;
}
g_propagate_error (error, internal_error);
-
return FALSE;
}
diff --git a/src/libtracker-sparql/tracker-backend.vala b/src/libtracker-sparql/tracker-backend.vala
index 1e9587e..8eb832c 100644
--- a/src/libtracker-sparql/tracker-backend.vala
+++ b/src/libtracker-sparql/tracker-backend.vala
@@ -263,11 +263,6 @@ class Tracker.Sparql.Backend : Connection {
// Call module init function
Tracker.Sparql.Connection c = module_init ();
- if (c == null) {
- // For some reason the error when set by module_init isn't passed on :-\
- throw new Sparql.Error.INTERNAL ("Unable to initialize database");
- }
-
debug ("Loaded module source: '%s'", module.name ());
return c;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]