dovecot-2.2: fts: Added back fts_expunge_log_uid_count()

dovecot at dovecot.org dovecot at dovecot.org
Tue Jan 27 00:08:37 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/eaa37c259891
changeset: 18202:eaa37c259891
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Jan 27 02:07:10 2015 +0200
description:
fts: Added back fts_expunge_log_uid_count()
This was accidentally removed by commit 5091f03d70e1

diffstat:

 src/plugins/fts/fts-expunge-log.c |  15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diffs (29 lines):

diff -r 0f337ba2bc08 -r eaa37c259891 src/plugins/fts/fts-expunge-log.c
--- a/src/plugins/fts/fts-expunge-log.c	Sun Jan 25 10:37:35 2015 -0800
+++ b/src/plugins/fts/fts-expunge-log.c	Tue Jan 27 02:07:10 2015 +0200
@@ -359,10 +359,25 @@
 	pool_unref(&ctx->pool);
 	return ret;
 }
+
+int fts_expunge_log_uid_count(struct fts_expunge_log *log,
+			      unsigned int *expunges_r)
+{
+	int ret;
+
+	if ((ret = fts_expunge_log_reopen_if_needed(log, FALSE)) <= 0) {
+		*expunges_r = 0;
+		return ret;
+	}
+
+	return fts_expunge_log_read_expunge_count(log, expunges_r);
+}
+
 int fts_expunge_log_append_commit(struct fts_expunge_log_append_ctx **_ctx)
 {
 	return fts_expunge_log_append_finalise(_ctx, TRUE);
 }
+
 int fts_expunge_log_append_abort(struct fts_expunge_log_append_ctx **_ctx)
 {
 	return fts_expunge_log_append_finalise(_ctx, FALSE);


More information about the dovecot-cvs mailing list