* [PATCH] mime-node: be clearer about decryption
@ 2019-05-31 1:18 Daniel Kahn Gillmor
2019-05-31 11:02 ` David Bremner
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Kahn Gillmor @ 2019-05-31 1:18 UTC (permalink / raw)
To: Notmuch Mail
Part 0 of a multipart/encrypted object is
GMIME_MULTIPART_ENCRYPTED_VERSION; part 1 is
GMIME_MULTIPART_ENCRYPTED_CONTENT. Using the name for what we want
describes our intent more clearly than using a magic number in the
code.
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
---
mime-node.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mime-node.c b/mime-node.c
index 3492bcd0..a93cbb31 100644
--- a/mime-node.c
+++ b/mime-node.c
@@ -339,7 +339,7 @@ mime_node_child (mime_node_t *parent, int child)
return NULL;
if (GMIME_IS_MULTIPART (parent->part)) {
- if (child == 1 && parent->decrypted_child)
+ if (child == GMIME_MULTIPART_ENCRYPTED_CONTENT && parent->decrypted_child)
sub = parent->decrypted_child;
else
sub = g_mime_multipart_get_part
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-05-31 11:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-31 1:18 [PATCH] mime-node: be clearer about decryption Daniel Kahn Gillmor
2019-05-31 11:02 ` David Bremner
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).