changeset 13232:3680e4a0ca95

fts: fts_expunge_log_uid_count() returned garbage on nonexistent log.
author Timo Sirainen <tss@iki.fi>
date Sun, 14 Aug 2011 20:41:44 +0300
parents 5d56c327752f
children 956b19efefc4
files src/plugins/fts/fts-expunge-log.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/fts/fts-expunge-log.c	Sun Aug 14 20:41:21 2011 +0300
+++ b/src/plugins/fts/fts-expunge-log.c	Sun Aug 14 20:41:44 2011 +0300
@@ -327,8 +327,10 @@
 {
 	int ret;
 
-	if ((ret = fts_expunge_log_reopen_if_needed(log, FALSE)) <= 0)
+	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);
 }