X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=mx.c;h=a63b28f30e9fb3ed45236bd8537df99b8dcef6b3;hp=5b48ab85247e9df5083f1ff013c2ba3119674bb1;hb=e7ca08ff86e3d01578d024a62385bafe7bceffd2;hpb=22601f25ede6703ba7cd06ee84eddd2045308570 diff --git a/mx.c b/mx.c index 5b48ab8..a63b28f 100644 --- a/mx.c +++ b/mx.c @@ -1423,3 +1423,27 @@ int mx_rebuild_cache (void) { return (0); #endif } + +void mutt_parse_mime_message (CONTEXT * ctx, HEADER * cur) +{ + MESSAGE *msg; + int flags = 0; + + do { + if (cur->content->type != TYPEMESSAGE + && cur->content->type != TYPEMULTIPART) + break; /* nothing to do */ + + if (cur->content->parts) + break; /* The message was parsed earlier. */ + + if ((msg = mx_open_message (ctx, cur->msgno))) { + mutt_parse_part (msg->fp, cur->content); + + cur->security = crypt_query (cur->content); + + mx_close_message (&msg); + } + } while (0); + mutt_count_body_parts (cur, flags | M_PARTS_RECOUNT); +}