Home GnuPG
Diffusion GpgOL 08a7a0db7169

Cache recipients trough oom and add fallbacks

Description

Cache recipients trough oom and add fallbacks

* src/mail.cpp (Mail::update_oom_data): Also cache recipients
from oom.
(Mail::Mail): Initialize cached recipients.
(Mail::~Mail): Free cached recipients.
(Mail::take_cached_recipients): New.
* src/mail.h: Update accordingly.
* src/message.cpp (get_recipients): Improve logging.
(sign_encrypt): Use cached recipients.
* src/oomhelp.cpp (get_oom_object): Tune down error.
(get_recipient_addr_fallbacks): New.
(get_oom_recipients): Improve with more fallbacks.
* src/oomhelp.h (PR_EMS_AB_PROXY_ADDRESSES_DASL): Define.

This is a blind fix as I can't reproduce scenarios where
this is necessary. Probably with exchange address books etc.
Adding more fallbacks should not hurt the current uses
where it would stop after the first lookup is successful.