Skip to content

Commit

Permalink
lib-index: Add missing error logging for mail_index_view_sync_begin()
Browse files Browse the repository at this point in the history
  • Loading branch information
sirainen authored and villesavolainen committed May 22, 2017
1 parent 0e0d686 commit c95d24a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/lib-index/mail-index-view-sync.c
Expand Up @@ -74,8 +74,12 @@ view_sync_set_log_view_range(struct mail_index_view *view, bool sync_expunges,
start_seq, start_offset,
end_seq, end_offset,
reset_r, &reason);
if (ret <= 0)
if (ret <= 0) {
mail_index_set_error(view->index,
"Failed to map view for %s: %s",
view->index->filepath, reason);
return ret;
}

if (!*reset_r || sync_expunges)
break;
Expand Down Expand Up @@ -508,12 +512,10 @@ static int mail_index_view_sync_init_fix(struct mail_index_view_sync_ctx *ctx)

ret = mail_transaction_log_view_set(view->log_view, seq, offset,
seq, offset, &reset, &reason);
if (ret < 0)
return -1;
if (ret == 0) {
if (ret <= 0) {
mail_index_set_error(view->index, "Failed to fix view for %s: %s",
view->index->filepath, reason);
return 0;
return ret;
}
view->inconsistent = FALSE;
return 0;
Expand Down

0 comments on commit c95d24a

Please sign in to comment.