Skip to content

Commit

Permalink
imap: Avoid assert-crash after a failed mailbox sync.
Browse files Browse the repository at this point in the history
We didn't close the mailbox and we didn't update message counts, so we could
have crashed with:

Panic: Message count decreased
  • Loading branch information
sirainen committed May 6, 2016
1 parent a16057f commit 89b3a53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/imap/imap-sync.c
Expand Up @@ -315,7 +315,7 @@ static int imap_sync_finish(struct imap_sync_context *ctx, bool aborting)
if (mailbox_sync_deinit(&ctx->sync_ctx, &ctx->sync_status) < 0 ||
ctx->failed) {
ctx->failed = TRUE;
return -1;
ret = -1;
}
mailbox_get_open_status(ctx->box, STATUS_UIDVALIDITY |
STATUS_MESSAGES | STATUS_RECENT |
Expand Down

0 comments on commit 89b3a53

Please sign in to comment.