summaryrefslogtreecommitdiffstats
path: root/crypt-gpgme.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypt-gpgme.c')
-rw-r--r--crypt-gpgme.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/crypt-gpgme.c b/crypt-gpgme.c
index 14d420e9..7283e109 100644
--- a/crypt-gpgme.c
+++ b/crypt-gpgme.c
@@ -2162,7 +2162,7 @@ static int line_compare(const char *a, size_t n, const char *b)
* Implementation of `pgp_check_traditional'.
*/
-static int pgp_check_traditional_one_body (FILE *fp, BODY *b, int tagged_only)
+static int pgp_check_traditional_one_body (FILE *fp, BODY *b)
{
char tempfile[_POSIX_PATH_MAX];
char buf[HUGE_STRING];
@@ -2174,9 +2174,6 @@ static int pgp_check_traditional_one_body (FILE *fp, BODY *b, int tagged_only)
if (b->type != TYPETEXT)
return 0;
- if (tagged_only && !b->tagged)
- return 0;
-
mutt_mktemp (tempfile, sizeof (tempfile));
if (mutt_decode_save_attachment (fp, b, tempfile, 0, 0) != 0)
{
@@ -2221,21 +2218,24 @@ static int pgp_check_traditional_one_body (FILE *fp, BODY *b, int tagged_only)
return 1;
}
-int pgp_gpgme_check_traditional (FILE *fp, BODY *b, int tagged_only)
+int pgp_gpgme_check_traditional (FILE *fp, BODY *b, int just_one)
{
int rv = 0;
int r;
for (; b; b = b->next)
{
- if (is_multipart (b))
- rv = (pgp_gpgme_check_traditional (fp, b->parts, tagged_only) || rv);
+ if (!just_one && is_multipart (b))
+ rv = (pgp_gpgme_check_traditional (fp, b->parts, 0) || rv);
else if (b->type == TYPETEXT)
{
if ((r = mutt_is_application_pgp (b)))
rv = (rv || r);
else
- rv = (pgp_check_traditional_one_body (fp, b, tagged_only) || rv);
+ rv = (pgp_check_traditional_one_body (fp, b) || rv);
}
+
+ if (just_one)
+ break;
}
return rv;
}