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 authored and villesavolainen committed Feb 12, 2018
1 parent 977a292 commit ea2dbaa
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 @@ -162,6 +162,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->reason = i_strdup(reason);
t->itrans = mail_index_transaction_begin(box->view, itrans_flags);
Expand Down
1 change: 0 additions & 1 deletion src/lib-storage/mail-storage.c
Expand Up @@ -2177,7 +2177,6 @@ mailbox_transaction_begin(struct mailbox *box,
box->transaction_count++;
trans = box->v.transaction_begin(box, flags, reason);
i_assert(trans->reason != NULL);
trans->flags = flags;
return trans;
}

Expand Down

0 comments on commit ea2dbaa

Please sign in to comment.