diff --git a/lib/mu-msg-part.c b/lib/mu-msg-part.c index 8601bb4d..1992b92c 100644 --- a/lib/mu-msg-part.c +++ b/lib/mu-msg-part.c @@ -481,6 +481,27 @@ looks_like_text_body_part (GMimeContentType *ctype) } +static MuMsgPartSigStatusReport* +copy_status_report_maybe (GObject *obj) +{ + MuMsgPartSigStatusReport *report, *copy; + + report = g_object_get_data (obj, SIG_STATUS_REPORT); + if (!report) + return NULL; /* nothing to copy */ + + copy = g_new0(MuMsgPartSigStatusReport, 1); + copy->verdict = report->verdict; + + if (report->report) + copy->report = g_strdup (report->report); + if (report->signers) + copy->signers = g_strdup (report->signers); + + return copy; +} + + /* call 'func' with information about this MIME-part */ static gboolean @@ -520,10 +541,7 @@ handle_part (MuMsg *msg, GMimePart *part, GMimeObject *parent, if (g_ascii_strcasecmp (msgpart.subtype, "pgp-signature") == 0 || decrypted) { msgpart.sig_status_report = - (MuMsgPartSigStatusReport*) - g_object_get_data (G_OBJECT(parent), - SIG_STATUS_REPORT); - + copy_status_report_maybe (G_OBJECT(parent)); if (msgpart.sig_status_report) msgpart.part_type |= MU_MSG_PART_TYPE_SIGNED; } @@ -533,6 +551,8 @@ handle_part (MuMsg *msg, GMimePart *part, GMimeObject *parent, func (msg, &msgpart, user_data); + mu_msg_part_sig_status_report_destroy (msgpart.sig_status_report); + return TRUE; } diff --git a/mu/mu-cmd-server.cc b/mu/mu-cmd-server.cc index a86c87d5..a1758a1a 100644 --- a/mu/mu-cmd-server.cc +++ b/mu/mu-cmd-server.cc @@ -1152,8 +1152,6 @@ make_command_map (Context& context) {"type", ArgInfo{Type::Symbol, true, "type of composition: reply/forward/edit/resend/new"}}, {"docid", ArgInfo{Type::Integer, false,"document id of parent-message, if any"}}, - {"extract-images", ArgInfo{Type::Symbol, false, - "whether to extract images for this messages (if any)"}}, {"extract-encrypted", ArgInfo{Type::Symbol, false, "whether to decrypt encrypted parts (if any)" }}}, "get contact information",