changeset 4235:304e4e4410b9 HEAD

And more generic error fix..
author Timo Sirainen <tss@iki.fi>
date Thu, 27 Apr 2006 16:39:47 +0300
parents c31d7c833d5c
children 789b586d9015
files src/lib-storage/index/dbox/dbox-sync.c
diffstat 1 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/dbox/dbox-sync.c	Thu Apr 27 16:36:24 2006 +0300
+++ b/src/lib-storage/index/dbox/dbox-sync.c	Thu Apr 27 16:39:47 2006 +0300
@@ -29,6 +29,12 @@
 		}
 		return -1;
 	}
+	if (*file_seq_r == 0) {
+		mail_storage_set_critical(STORAGE(ctx->mbox->storage),
+			"Cached message offset lost for seq %u in "
+			"dbox %s", seq, ctx->mbox->path);
+		return -1;
+	}
 	return 0;
 }
 
@@ -45,13 +51,6 @@
 	if (dbox_sync_get_file_offset(ctx, seq, &file_seq, &offset) < 0)
 		return -1;
 
-	if (file_seq == 0) {
-		mail_storage_set_critical(STORAGE(ctx->mbox->storage),
-			"Cached message offset lost for seq %u in "
-			"dbox %s", seq, ctx->mbox->path);
-		return -1;
-	}
-
 	file_seqs = array_get(&ctx->added_file_seqs, &count);
 	for (i = 0; i < count; i++) {
 		if (file_seqs[i] == file_seq) {