Skip to content

mailbox: Lock destination when copying or moving

Peter Bloomfield requested to merge lock-dest-when-copying into master

When either moving messages from one mailbox to another, or copying them, we need to lock both mailboxes, not just the source mailbox.

* libbalsa/mailbox.c
  (libbalsa_mailbox_real_messages_copy): remove guards;
  (messages_copy_locked): helper;
  (libbalsa_mailbox_messages_copy): guard and lock destination, and use helper;
  (libbalsa_mailbox_messages_move): ditto.
Edited by Peter Bloomfield

Merge request reports