ctors/dtors for BODY's
[apps/madmutt.git] / lib-crypt / pgp.c
index 1cbcc6f..408bf33 100644 (file)
@@ -914,7 +914,7 @@ int pgp_encrypted_handler (BODY * a, STATE * s)
       state_attach_puts (_("[-- End of PGP/MIME encrypted data --]\n"), s);
     }
 
-    mutt_free_body (&tattach);
+    body_list_wipe(&tattach);
     /* clear 'Invoking...' message, since there's no error */
     mutt_message _("PGP message successfully decrypted.");
   } else {
@@ -1023,7 +1023,7 @@ BODY *pgp_sign_message (BODY * a)
     return (NULL);              /* fatal error while signing */
   }
 
-  t = mutt_new_body ();
+  t = body_new();
   t->type = TYPEMULTIPART;
   t->subtype = m_strdup("signed");
   t->encoding = ENC7BIT;
@@ -1037,7 +1037,7 @@ BODY *pgp_sign_message (BODY * a)
   t->parts = a;
   a = t;
 
-  t->parts->next = mutt_new_body ();
+  t->parts->next = body_new();
   t = t->parts->next;
   t->type = TYPEAPPLICATION;
   t->subtype = m_strdup("pgp-signature");
@@ -1269,7 +1269,7 @@ BODY *pgp_encrypt_message (BODY * a, char *keylist, int sign)
     return (NULL);
   }
 
-  t = mutt_new_body ();
+  t = body_new();
   t->type = TYPEMULTIPART;
   t->subtype = m_strdup("encrypted");
   t->encoding = ENC7BIT;
@@ -1279,12 +1279,12 @@ BODY *pgp_encrypt_message (BODY * a, char *keylist, int sign)
   parameter_set_boundary(&t->parameter);
   parameter_setval(&t->parameter, "protocol", "application/pgp-encrypted");
 
-  t->parts = mutt_new_body ();
+  t->parts = body_new();
   t->parts->type = TYPEAPPLICATION;
   t->parts->subtype = m_strdup("pgp-encrypted");
   t->parts->encoding = ENC7BIT;
 
-  t->parts->next = mutt_new_body ();
+  t->parts->next = body_new();
   t->parts->next->type = TYPEAPPLICATION;
   t->parts->next->subtype = m_strdup("octet-stream");
   t->parts->next->encoding = ENC7BIT;
@@ -1437,7 +1437,7 @@ BODY *pgp_traditional_encryptsign (BODY * a, int flags, char *keylist)
     return NULL;
   }
 
-  b = mutt_new_body ();
+  b = body_new();
 
   b->encoding = ENC7BIT;