aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch-show.c
diff options
context:
space:
mode:
authorAustin Clements <amdragon@MIT.EDU>2012-02-19 19:26:29 -0500
committerDavid Bremner <bremner@debian.org>2012-03-01 08:32:34 -0400
commit99789e77f2a18fd89198fd9cebdb7a756dd367e3 (patch)
treeeb45cbc119e8a82f92f89cd46395627c7f48479e /notmuch-show.c
parent1f0ead385a11422be4a06c574d8836eaa65a5d39 (diff)
show: Make format_part_sigstatus_json's API consistent between GMIME 2.4 and 2.6
The implementation is still different for GMIME 2.4 and 2.6, but at least now the caller doesn't have to be aware of this.
Diffstat (limited to 'notmuch-show.c')
-rw-r--r--notmuch-show.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/notmuch-show.c b/notmuch-show.c
index 8fb6fa67..07276c7d 100644
--- a/notmuch-show.c
+++ b/notmuch-show.c
@@ -404,8 +404,10 @@ signer_status_to_string (GMimeSignerStatus x)
#ifdef GMIME_ATLEAST_26
static void
-format_part_sigstatus_json (GMimeSignatureList *siglist)
+format_part_sigstatus_json (mime_node_t *node)
{
+ GMimeSignatureList *siglist = node->sig_list;
+
printf ("[");
if (!siglist) {
@@ -470,8 +472,10 @@ format_part_sigstatus_json (GMimeSignatureList *siglist)
}
#else
static void
-format_part_sigstatus_json (const GMimeSignatureValidity* validity)
+format_part_sigstatus_json (mime_node_t *node)
{
+ const GMimeSignatureValidity* validity = node->sig_validity;
+
printf ("[");
if (!validity) {
@@ -696,11 +700,7 @@ format_part_json (const void *ctx, mime_node_t *node, notmuch_bool_t first)
if (node->verify_attempted) {
printf (", \"sigstatus\": ");
-#ifdef GMIME_ATLEAST_26
- format_part_sigstatus_json (node->sig_list);
-#else
- format_part_sigstatus_json (node->sig_validity);
-#endif
+ format_part_sigstatus_json (node);
}
printf (", \"content-type\": %s",