[PATCH] Actually close the xapian database in notmuch_database_close
Justus Winter
4winter at informatik.uni-hamburg.de
Wed Feb 29 01:19:17 PST 2012
Formerly the xapian database object was deleted and closed in its
destructor once the object was garbage collected. Explicitly call
close() so that the database and the associated lock is released
immediately.
Signed-off-by: Justus Winter <4winter at informatik.uni-hamburg.de>
---
lib/database.cc | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/lib/database.cc b/lib/database.cc
index 5efa85e..79cf375 100644
--- a/lib/database.cc
+++ b/lib/database.cc
@@ -726,6 +726,10 @@ notmuch_database_close (notmuch_database_t *notmuch)
}
}
+ if (notmuch->xapian_db != NULL) {
+ notmuch->xapian_db->close();
+ }
+
delete notmuch->term_gen;
delete notmuch->query_parser;
delete notmuch->xapian_db;
--
1.7.9
More information about the notmuch
mailing list