summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiegfried-Angel Gevatter Pujals <rainct@ubuntu.com>2012-04-24 20:59:12 +0200
committerSiegfried-Angel Gevatter Pujals <rainct@ubuntu.com>2012-05-22 20:38:43 +0200
commite242e78174ade16cb962e510763285270572c27c (patch)
tree03608802cbba011f0e9c277c3e587a4b63f13c5e
parent897c99c9d031d75636434a410bff7824f04dcc50 (diff)
FTS++: Make sure Xapian is closed before releasing the bus name
-rw-r--r--extensions/fts++/zeitgeist-fts.vala10
1 files changed, 7 insertions, 3 deletions
diff --git a/extensions/fts++/zeitgeist-fts.vala b/extensions/fts++/zeitgeist-fts.vala
index 7800a828..29ea1f4d 100644
--- a/extensions/fts++/zeitgeist-fts.vala
+++ b/extensions/fts++/zeitgeist-fts.vala
@@ -69,10 +69,10 @@ namespace Zeitgeist
indexer = new Indexer (engine);
}
- private void do_quit ()
+ private void close ()
{
engine.close ();
- mainloop.quit ();
+ indexer = null; // close the index
}
public void register_dbus_object (DBusConnection conn) throws IOError
@@ -231,6 +231,10 @@ namespace Zeitgeist
if (instance != null)
{
+ // Close any database connections
+ instance.close ();
+
+ // Release the bus name
Bus.unown_name (owner_id);
instance.unregister_dbus_object ();
instance = null;
@@ -249,7 +253,7 @@ namespace Zeitgeist
static void safe_exit ()
{
- instance.do_quit ();
+ mainloop.quit ();
}
static int main (string[] args)