Home GnuPG
Diffusion GpgOL 66ab6d830ade

Add error handling and closing for split mails

Description

Add error handling and closing for split mails

* src/cryptcontroller.cpp (CryptController::do_crypto): Use
new copyParent to detect copy. Unregister op after triggering
split.
* src/mail.cpp (Mail::Mail): Use m_copy_parent and accessors instead
of boolean is_split_copy.
(do_crypt): Abort /register pending ops.
(Mail::setSplitCopy): Replace by Mail::copyParent.
* src/windowmessages.cpp (invoke_send_bottom): Send invocation
after all crypto jobs are complete.
(gpgol_window_proc): Add tracking of pending and ready ops.
(wm_unregister_pending_op): New. Allow to unregister single
op.
(wm_abort_pending_ops): Add dbg output and reset recipients
of parent.
* src/windowmessages.h (wm_unregister_pending_op): Add prototype.

This solves the problem that for example if you abort pinentry
on the first mail, but in the second mail you provide the
passphrase or some error occurs with one mail some mails would
be sent and others not. This way we wait until all mails
are ready and only then send them out, cancelling all mails
that are about to be send in case of an error. Due to the
fact that we now keep the copyparent with the original recipients
around a user can hit send a second time after error with
the same recipients and content.

Details

Provenance
aheineckeAuthored on Feb 1 2021, 10:35 AM
Parents
rO48aa002f3a96: Implement BCC splits of Mails
Branches
Unknown
Tags
Unknown
Tasks
T4814: GpgOL: Send multiple E-Mails for BCC recipients