mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 19:08:09 +01:00
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.
This commit is contained in:
parent
1f0ead385a
commit
99789e77f2
1 changed files with 7 additions and 7 deletions
|
@ -404,8 +404,10 @@ signer_status_to_string (GMimeSignerStatus x)
|
||||||
|
|
||||||
#ifdef GMIME_ATLEAST_26
|
#ifdef GMIME_ATLEAST_26
|
||||||
static void
|
static void
|
||||||
format_part_sigstatus_json (GMimeSignatureList *siglist)
|
format_part_sigstatus_json (mime_node_t *node)
|
||||||
{
|
{
|
||||||
|
GMimeSignatureList *siglist = node->sig_list;
|
||||||
|
|
||||||
printf ("[");
|
printf ("[");
|
||||||
|
|
||||||
if (!siglist) {
|
if (!siglist) {
|
||||||
|
@ -470,8 +472,10 @@ format_part_sigstatus_json (GMimeSignatureList *siglist)
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static void
|
static void
|
||||||
format_part_sigstatus_json (const GMimeSignatureValidity* validity)
|
format_part_sigstatus_json (mime_node_t *node)
|
||||||
{
|
{
|
||||||
|
const GMimeSignatureValidity* validity = node->sig_validity;
|
||||||
|
|
||||||
printf ("[");
|
printf ("[");
|
||||||
|
|
||||||
if (!validity) {
|
if (!validity) {
|
||||||
|
@ -696,11 +700,7 @@ format_part_json (const void *ctx, mime_node_t *node, notmuch_bool_t first)
|
||||||
|
|
||||||
if (node->verify_attempted) {
|
if (node->verify_attempted) {
|
||||||
printf (", \"sigstatus\": ");
|
printf (", \"sigstatus\": ");
|
||||||
#ifdef GMIME_ATLEAST_26
|
format_part_sigstatus_json (node);
|
||||||
format_part_sigstatus_json (node->sig_list);
|
|
||||||
#else
|
|
||||||
format_part_sigstatus_json (node->sig_validity);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
printf (", \"content-type\": %s",
|
printf (", \"content-type\": %s",
|
||||||
|
|
Loading…
Reference in a new issue