]> diplodocus.org Git - nmh/commitdiff
Added a couple of global variables to mhparse.c to allow
authorDavid Levine <levinedl@acm.org>
Fri, 15 Feb 2013 03:53:50 +0000 (21:53 -0600)
committerDavid Levine <levinedl@acm.org>
Fri, 15 Feb 2013 03:53:50 +0000 (21:53 -0600)
suppression of the warning about bogus multipart content,
and detection of it.

uip/mhparse.c

index a80cc7460ca59a0401efd46f0c897dbcafe7e2db..dd7c83de2936aeebb6e764ff1050bf9d02443916 100644 (file)
@@ -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;