rationalize list handling in mutt a bit.
[apps/madmutt.git] / lib-mime / rfc2231.c
index ff6a02c..e1eec1e 100644 (file)
@@ -141,7 +141,7 @@ static void purge_empty_parameters(PARAMETER **headp)
         if (!p->attribute || !p->value) {
             *headp = p->next;
             p->next = NULL;
-            parameter_delete(&p);
+            parameter_list_wipe(&p);
         } else {
             headp = &(*headp)->next;
         }
@@ -242,8 +242,8 @@ void rfc2231_decode_parameters (PARAMETER ** headp)
             if (option (OPTRFC2047PARAMS) && p->value && strstr (p->value, "=?"))
                 rfc2047_decode (&p->value);
             else if (!option (OPTSTRICTMIME)) {
-                if (ascii_strcasecmp (AssumedCharset, "us-ascii"))
-                    mutt_convert_nonmime_string (&p->value);
+                if (mime_which_token(AssumedCharset, -1) == MIME_US_ASCII)
+                    mutt_convert_nonmime_string(&p->value);
             }
 
             *last = p;