dovecot-2.0: lib-index: Added mail_index_view_get_transaction_co...

dovecot at dovecot.org dovecot at dovecot.org
Sun Jun 13 17:40:56 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/aa66db4073c5
changeset: 11538:aa66db4073c5
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Jun 13 15:40:10 2010 +0100
description:
lib-index: Added mail_index_view_get_transaction_count().

diffstat:

 src/lib-index/mail-index-view.c |  8 ++++++++
 src/lib-index/mail-index.h      |  3 +++
 2 files changed, 11 insertions(+), 0 deletions(-)

diffs (31 lines):

diff -r 7a02b84ad7f5 -r aa66db4073c5 src/lib-index/mail-index-view.c
--- a/src/lib-index/mail-index-view.c	Sat Jun 12 02:14:04 2010 +0100
+++ b/src/lib-index/mail-index-view.c	Sun Jun 13 15:40:10 2010 +0100
@@ -68,6 +68,14 @@
 	return view->index;
 }
 
+unsigned int
+mail_index_view_get_transaction_count(struct mail_index_view *view)
+{
+	i_assert(view->transactions >= 0);
+
+	return view->transactions;
+}
+
 void mail_index_view_transaction_ref(struct mail_index_view *view)
 {
 	view->transactions++;
diff -r 7a02b84ad7f5 -r aa66db4073c5 src/lib-index/mail-index.h
--- a/src/lib-index/mail-index.h	Sat Jun 12 02:14:04 2010 +0100
+++ b/src/lib-index/mail-index.h	Sun Jun 13 15:40:10 2010 +0100
@@ -250,6 +250,9 @@
 uint32_t mail_index_view_get_messages_count(struct mail_index_view *view);
 /* Returns TRUE if we lost track of changes for some reason. */
 bool mail_index_view_is_inconsistent(struct mail_index_view *view);
+/* Returns number of transactions open for the view. */
+unsigned int
+mail_index_view_get_transaction_count(struct mail_index_view *view);
 
 /* Transaction has to be opened to be able to modify index. You can have
    multiple transactions open simultaneously. Committed transactions won't


More information about the dovecot-cvs mailing list