mime-node: be clearer about decryption

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>
This commit is contained in:
Daniel Kahn Gillmor 2019-05-30 21:18:53 -04:00 committed by David Bremner
parent 2c1e5c186e
commit d439e4b5d1

View file

@ -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