]> granicus.if.org Git - mutt/commitdiff
Fix the PgpSignMicalg vanishing when recalling postponed messages.
authorThomas Roessler <roessler@does-not-exist.org>
Thu, 1 Oct 1998 09:19:37 +0000 (09:19 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Thu, 1 Oct 1998 09:19:37 +0000 (09:19 +0000)
Bug squashed by Bjørn Fischer.

send.c

diff --git a/send.c b/send.c
index 8aa38a74948d956851d6c9dfb2d785208a591aac..53ed7153608421e686381ddcd6270bde68d9381a 100644 (file)
--- 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 */