summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1998-10-01 09:19:37 +0000
committerThomas Roessler <roessler@does-not-exist.org>1998-10-01 09:19:37 +0000
commit6a51d792deb878036197961a68d2eb0bef77ef5a (patch)
tree6556bcaf650881060d42c7818462e6716266413e
parent27f7d55ff147807fbb95d9361c3b669c835d16c0 (diff)
Fix the PgpSignMicalg vanishing when recalling postponed messages.
Bug squashed by Bjørn Fischer.
-rw-r--r--send.c52
1 files changed, 29 insertions, 23 deletions
diff --git a/send.c b/send.c
index 8aa38a74..53ed7153 100644
--- a/send.c
+++ b/send.c
@@ -850,15 +850,28 @@ ci_send_message (int flags, /* send mode */
/* save current value of "pgp_sign_as" */
char *signas = NULL;
char *signmic = NULL;
+#endif
+
+ if (!flags && quadoption (OPT_RECALL) != M_NO && mutt_num_postponed ())
+ {
+ /* If the user is composing a new message, check to see if there
+ * are any postponed messages first.
+ */
+ if ((i = query_quadoption (OPT_RECALL, "Recall postponed message?")) == -1)
+ goto cleanup;
- if (flags == SENDPOSTPONED)
+ if(i == M_YES)
+ flags |= SENDPOSTPONED;
+ }
+
+
+#ifdef _PGPPATH
+ if (flags & SENDPOSTPONED)
{
signas = safe_strdup(PgpSignAs);
signmic = safe_strdup(PgpSignMicalg);
}
#endif /* _PGPPATH */
-
-
if (msg)
{
@@ -880,20 +893,6 @@ ci_send_message (int flags, /* send mode */
if ((flags = mutt_get_postponed (ctx, msg, &cur)) < 0)
goto cleanup;
}
- else if (!flags && quadoption (OPT_RECALL) != M_NO && mutt_num_postponed ())
- {
- /* If the user is composing a new message, check to see if there
- * are any postponed messages first.
- */
- if ((i = query_quadoption (OPT_RECALL, "Recall postponed message?")) == -1)
- goto cleanup;
-
- if (i == M_YES)
- {
- if ((flags = mutt_get_postponed (ctx, msg, &cur)) < 0)
- flags = 0;
- }
- }
if (flags & (SENDPOSTPONED | SENDEDITMSG))
{
@@ -1329,13 +1328,20 @@ cleanup:
#ifdef _PGPPATH
- if (flags == SENDPOSTPONED)
+ if (flags & SENDPOSTPONED)
{
- safe_free((void **) &PgpSignAs);
- safe_free((void **) &PgpSignMicalg);
-
- PgpSignAs = signas;
- PgpSignMicalg = signmic;
+
+ if(signas)
+ {
+ safe_free((void **) &PgpSignAs);
+ PgpSignAs = signas;
+ }
+
+ if(signmic)
+ {
+ safe_free((void **) &PgpSignMicalg);
+ PgpSignMicalg = signmic;
+ }
}
#endif /* _PGPPATH */