X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-crypt%2Fcrypt.c;h=dd2eb02e4b3c897792235231af9bb144edd0fcdc;hp=3ee7853c3ca47aefa786de2e720add68c7a55be3;hb=129050c6742f6be13fa5635ba03542b7fb2a9525;hpb=6790552986464d9ad4be03f361a332441b0f08eb diff --git a/lib-crypt/crypt.c b/lib-crypt/crypt.c index 3ee7853..dd2eb02 100644 --- a/lib-crypt/crypt.c +++ b/lib-crypt/crypt.c @@ -122,10 +122,8 @@ int mutt_protect (HEADER * msg, char *keylist) } /* otherwise inline won't work...ask for revert */ - if ((i = - query_quadoption (OPT_PGPMIMEAUTO, - _ - ("Message can't be sent inline. Revert to using PGP/MIME?"))) + if ((i = query_quadoption(OPT_PGPMIMEAUTO, + _("Message can't be sent inline. Revert to using PGP/MIME?"))) != M_YES) { mutt_error _("Mail not sent."); @@ -294,7 +292,6 @@ static int crypt_write_signed (BODY * a, STATE * s, FILE *fp) fputc (c, fp); } - fclose (fp); return 0; } @@ -352,7 +349,7 @@ void crypt_extract_keys_from_messages (HEADER * h) if (Context->hdrs[Context->v2r[i]]->security & ENCRYPT && !crypt_valid_passphrase (Context->hdrs[Context->v2r[i]]-> security)) { - fclose (fpout); + m_fclose(&fpout); break; } @@ -423,7 +420,7 @@ void crypt_extract_keys_from_messages (HEADER * h) } } - fclose (fpout); + m_fclose(&fpout); if (isendwin ()) mutt_any_key_to_continue (NULL); @@ -548,9 +545,8 @@ int mutt_signed_handler (BODY * a, STATE * s) if (sigcnt) { tempfp = m_tempfile(tempfile, sizeof(tempfile), NONULL(Tempdir), NULL); if (!tempfp) { - mutt_perror (tempfile); - } - else { + mutt_error(_("Could not create temporary file")); + } else { if (crypt_write_signed (a, s, tempfp) == 0) { for (i = 0; i < sigcnt; i++) { if (signatures[i]->type == TYPEAPPLICATION @@ -576,6 +572,7 @@ int mutt_signed_handler (BODY * a, STATE * s) TYPE (signatures[i]), signatures[i]->subtype); } } + m_fclose(&tempfp); } mutt_unlink (tempfile);