Skip to content

Commit

Permalink
lib-storage: Set mailbox_transaction_context.flags earlier
Browse files Browse the repository at this point in the history
Set it in index_transaction_init() so plugins' transaction_begin() methods
see it after calling super.transaction_begin().
  • Loading branch information
sirainen committed Feb 12, 2018
1 parent f0e0f69 commit 315328a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions src/lib-storage/index/index-transaction.c
Expand Up @@ -158,6 +158,7 @@ void index_transaction_init(struct mailbox_transaction_context *t,
if ((flags & MAILBOX_TRANSACTION_FLAG_REFRESH) != 0)
mail_index_refresh(box->index);

t->flags = flags;
t->box = box;
t->itrans = mail_index_transaction_begin(box->view, itrans_flags);
t->view = mail_index_transaction_open_updated_view(t->itrans);
Expand Down
1 change: 0 additions & 1 deletion src/lib-storage/mail-storage.c
Expand Up @@ -2098,7 +2098,6 @@ mailbox_transaction_begin(struct mailbox *box,

box->transaction_count++;
trans = box->v.transaction_begin(box, flags);
trans->flags = flags;
return trans;
}

Expand Down

0 comments on commit 315328a

Please sign in to comment.