X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=attach.c;h=d2ed956ceb6707339997c12c49cd29cbc7410580;hp=5f588b707109065661736b7d6425c2290247a765;hb=e25b0de8c4e7d6aeeb467f8ea1ad8dd6b2a9470e;hpb=83532821ae9fab034d0d630b78330c9ea4ff4cf3 diff --git a/attach.c b/attach.c index 5f588b7..d2ed956 100644 --- a/attach.c +++ b/attach.c @@ -30,7 +30,7 @@ #include "pager.h" #include "copy.h" #include "mx.h" -#include "mutt_crypt.h" +#include #include "lib/debug.h" @@ -142,7 +142,7 @@ int mutt_compose_attachment (BODY * a) b = mutt_read_mime_header (fp, 0); if (b) { if (b->parameter) { - mutt_free_parameter (&a->parameter); + parameter_delete(&a->parameter); a->parameter = b->parameter; b->parameter = NULL; } @@ -322,9 +322,11 @@ void mutt_check_lookup_list (BODY * b, char *type, int len) ascii_strncasecmp (type, t->data, i) == 0) || ascii_strcasecmp (type, t->data) == 0) { - BODY tmp = { 0 }; + BODY tmp; int n; + p_clear(&tmp, 1); + if ((n = mutt_lookup_mime_type (&tmp, b->filename)) != TYPEOTHER) { snprintf (type, len, "%s/%s", n == TYPEAUDIO ? "audio" : @@ -397,7 +399,7 @@ int mutt_view_attachment (FILE * fp, BODY * a, int flag, HEADER * hdr, int unlink_tempfile = 0; is_message = mutt_is_message_type (a->type, a->subtype); - if (WithCrypto && is_message && a->hdr && (a->hdr->security & ENCRYPT) && + if (is_message && a->hdr && (a->hdr->security & ENCRYPT) && !crypt_valid_passphrase (a->hdr->security)) return (rc); use_mailcap = (flag == M_MAILCAP || @@ -863,7 +865,7 @@ int mutt_decode_save_attachment (FILE * fp, BODY * m, char *path, m->length = 0; m->encoding = saved_encoding; if (saved_parts) { - mutt_free_header (&m->hdr); + header_delete(&m->hdr); m->parts = saved_parts; m->hdr = saved_hdr; }