From d75b71ec84578fcb66e6d4e1ccd5cc8c45363cbd Mon Sep 17 00:00:00 2001 From: markus schnalke Date: Mon, 26 Mar 2012 21:29:45 +0200 Subject: [PATCH] Changed second argument of calls to part_ok() and type_ok() from 0 to 1, to match what store_multi() in mhstoresbr.c does. A test case is below. Without this fix, the following command: mhshow -part 1.1 -form mhl.null produced no output. mhlist showed a part 1.1: msg part type/subtype size description 1231 multipart/mixed 276 1 multipart/related 107 1.1 text/plain 29 and "mhstore -part 1.1" properly stored it. With this fix, mhshow behaves properly and shows the part. Analogous behavior happened with -type text/plain. test case: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="NextPart_001" Content-class: urn:content-classes:message Date: Thu, 19 May 2011 00:00:00 -0000 From: sender@example.com To: recipient@example.com This is a multi-part message in MIME format. --NextPart_001 Content-Type: multipart/related; type="multipart/alternative"; boundary="NextPart_002" --NextPart_002 Content-Type: text/plain; charset="utf-8" This is the text/plain part. --NextPart_002-- --NextPart_001-- Merged from nmh. Thanks to David Levine. --- uip/mhshowsbr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uip/mhshowsbr.c b/uip/mhshowsbr.c index 9f69c54..3e730ce 100644 --- a/uip/mhshowsbr.c +++ b/uip/mhshowsbr.c @@ -700,7 +700,7 @@ show_multi_internal(CT ct, int serial, int alternate) for (part = m->mp_parts; part; part = part->mp_next) { p = part->mp_part; - if (part_ok(p, 0) && type_ok(p, 0)) { + if (part_ok(p, 1) && type_ok(p, 1)) { int inneresult; inneresult = show_switch(p, nowserial, nowalternate); -- 1.7.10.4