On Fri, May 11 2018, Daniel Kahn Gillmor <d...@fifthhorseman.net> wrote:
> When indexing the cleartext of an encrypted message, record any
> protected subject in the database, which should make it findable and
> visible in search.
> ---
>  lib/index.cc                   | 42 ++++++++++++++++++++++++++--------
...
> diff --git a/lib/index.cc b/lib/index.cc
> index 0ad683fa..db16b6f8 100644
> --- a/lib/index.cc
> +++ b/lib/index.cc
...
> @@ -430,8 +435,13 @@ _index_mime_part (notmuch_message_t *message,
>               }
>               continue;
>           }
> -         _index_mime_part (message, indexopts,
> -                           g_mime_multipart_get_part (multipart, i));
> +         child = g_mime_multipart_get_part (multipart, i);
> +         status = _notmuch_message_crypto_potential_payload (msg_crypto, 
> child, part, i);
> +         if (status)
> +             _notmuch_database_log (_notmuch_message_database (message),
> +                                    "Warning: failed to mark the potential 
> cryptographic payload (%s).\n",
> +                                    notmuch_status_to_string (status));
> +         _index_mime_part (message, indexopts, child, msg_crypto);
>       }
>       return;
>      }

In 9088db76d89264b733f6b45e776d8952da237921 _notmuch_message_database
was exposed as notmuch_message_get_database, so this patch needs to be
updated:

diff --git a/lib/index.cc b/lib/index.cc
index 74e1ba43..18e712b1 100644
--- a/lib/index.cc
+++ b/lib/index.cc
@@ -438,7 +438,7 @@ _index_mime_part (notmuch_message_t *message,
            child = g_mime_multipart_get_part (multipart, i);
            status = _notmuch_message_crypto_potential_payload (msg_crypto, 
child, part, i);
            if (status)
-               _notmuch_database_log (_notmuch_message_database (message),
+               _notmuch_database_log (notmuch_message_get_database (message),
                                       "Warning: failed to mark the potential 
cryptographic payload (%s).\n",
                                       notmuch_status_to_string (status));
            _index_mime_part (message, indexopts, child, msg_crypto);

This fix doesn't affect any of the subsequent patches in this series.

jamie.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Reply via email to