From: David Levine Date: Fri, 15 Feb 2013 03:53:50 +0000 (-0600) Subject: Added a couple of global variables to mhparse.c to allow X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/fa504a1914319ffbe061820e4e2664f56b43fb0f?hp=3835f2c8c1651b4aa5e21337196c7c6426d01c2c Added a couple of global variables to mhparse.c to allow suppression of the warning about bogus multipart content, and detection of it. --- diff --git a/uip/mhparse.c b/uip/mhparse.c index a80cc746..dd7c83de 100644 --- a/uip/mhparse.c +++ b/uip/mhparse.c @@ -37,10 +37,14 @@ int checksw = 0; /* check Content-MD5 field */ char *tmp; /* - * Instruct parser not to detect invalid Content-Transfer-Encoding - * in a multipart. + * These are for mhfixmsg to: + * 1) Instruct parser not to detect invalid Content-Transfer-Encoding + * in a multipart. + * 2) Suppress the warning about bogus multipart content, and report it. */ int skip_mp_cte_check; +int suppress_bogus_mp_content_warning; +int bogus_mp_content; /* * Structures for TEXT messages @@ -1243,7 +1247,11 @@ end_part: } } - advise (NULL, "bogus multipart content in message %s", ct->c_file); + if (suppress_bogus_mp_content_warning) { + bogus_mp_content = 1; + } else { + advise (NULL, "bogus multipart content in message %s", ct->c_file); + } if (!inout && part) { p = part->mp_part; p->c_end = ct->c_end;