dovecot-2.0: mail_transaction_log_view_clear() should keep oldes...
dovecot at dovecot.org
dovecot at dovecot.org
Sat May 9 19:29:15 EEST 2009
details: http://hg.dovecot.org/dovecot-2.0/rev/4d6f33fa08ee
changeset: 9250:4d6f33fa08ee
user: Timo Sirainen <tss at iki.fi>
date: Sat May 09 12:29:08 2009 -0400
description:
mail_transaction_log_view_clear() should keep oldest_file_seq and newer referenced.
diffstat:
2 files changed, 6 insertions(+), 4 deletions(-)
src/lib-index/mail-transaction-log-view.c | 6 ++++--
src/lib-index/mail-transaction-log.h | 4 ++--
diffs (30 lines):
diff -r 5e1a4020a277 -r 4d6f33fa08ee src/lib-index/mail-transaction-log-view.c
--- a/src/lib-index/mail-transaction-log-view.c Sat May 09 10:00:09 2009 -0400
+++ b/src/lib-index/mail-transaction-log-view.c Sat May 09 12:29:08 2009 -0400
@@ -313,8 +313,10 @@ void mail_transaction_log_view_clear(str
mail_transaction_log_view_unref_all(view);
if (mail_transaction_log_find_file(view->log, oldest_file_seq, FALSE,
&file) > 0) {
- array_append(&view->file_refs, &file, 1);
- file->refcount++;
+ for (; file != NULL; file = file->next) {
+ array_append(&view->file_refs, &file, 1);
+ file->refcount++;
+ }
}
view->cur = view->head = view->tail = NULL;
diff -r 5e1a4020a277 -r 4d6f33fa08ee src/lib-index/mail-transaction-log.h
--- a/src/lib-index/mail-transaction-log.h Sat May 09 10:00:09 2009 -0400
+++ b/src/lib-index/mail-transaction-log.h Sat May 09 12:29:08 2009 -0400
@@ -175,8 +175,8 @@ int mail_transaction_log_view_set(struct
uint32_t min_file_seq, uoff_t min_file_offset,
uint32_t max_file_seq, uoff_t max_file_offset,
bool *reset_r);
-/* Clear the view. Keep oldest_file_seq log referenced so we don't get
- desynced. */
+/* Clear the view. Keep oldest_file_seq and newer log files referenced so we
+ don't get desynced. */
void mail_transaction_log_view_clear(struct mail_transaction_log_view *view,
uint32_t oldest_file_seq);
More information about the dovecot-cvs
mailing list