mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-09 12:54:23 +01:00
gpg: When showing conflicts, also show bindings with no recorded sigs.
* g10/tofu.c (signature_stats_collect_cb): If the time_ago column is NULL, then both time_ago and count should be 0. (get_trust): Reverse the direction of the join so that we also get statistics about bindings without any signatures. -- Signed-off-by: Neal H. Walfield <neal@g10code.com>
This commit is contained in:
parent
445f94bc81
commit
d3eca51774
18
g10/tofu.c
18
g10/tofu.c
@ -1061,6 +1061,10 @@ signature_stats_collect_cb (void *cookie, int argc, char **argv,
|
|||||||
}
|
}
|
||||||
i ++;
|
i ++;
|
||||||
|
|
||||||
|
if (! argv[i])
|
||||||
|
time_ago = 0;
|
||||||
|
else
|
||||||
|
{
|
||||||
tail = NULL;
|
tail = NULL;
|
||||||
errno = 0;
|
errno = 0;
|
||||||
time_ago = strtol (argv[i], &tail, 0);
|
time_ago = strtol (argv[i], &tail, 0);
|
||||||
@ -1071,8 +1075,15 @@ signature_stats_collect_cb (void *cookie, int argc, char **argv,
|
|||||||
__func__, argv[i], tail);
|
__func__, argv[i], tail);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
i ++;
|
i ++;
|
||||||
|
|
||||||
|
/* If time_ago is NULL, then we had no messages, but we still have a
|
||||||
|
single row, which count(*) turns into 1. */
|
||||||
|
if (! argv[i - 1])
|
||||||
|
count = 0;
|
||||||
|
else
|
||||||
|
{
|
||||||
tail = NULL;
|
tail = NULL;
|
||||||
errno = 0;
|
errno = 0;
|
||||||
count = strtoul (argv[i], &tail, 0);
|
count = strtoul (argv[i], &tail, 0);
|
||||||
@ -1083,6 +1094,7 @@ signature_stats_collect_cb (void *cookie, int argc, char **argv,
|
|||||||
__func__, argv[i], tail);
|
__func__, argv[i], tail);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
i ++;
|
i ++;
|
||||||
|
|
||||||
assert (argc == i);
|
assert (argc == i);
|
||||||
@ -1551,10 +1563,12 @@ get_trust (struct db *dbs, const char *fingerprint, const char *email,
|
|||||||
" else round(delta / %d) * %d\n"
|
" else round(delta / %d) * %d\n"
|
||||||
" end time_ago,\n"
|
" end time_ago,\n"
|
||||||
" delta time_ago_raw\n"
|
" delta time_ago_raw\n"
|
||||||
" from (select *,\n"
|
" from bindings\n"
|
||||||
|
" left join\n"
|
||||||
|
" (select *,\n"
|
||||||
" cast(strftime('%%s','now') - sig_time as real) delta\n"
|
" cast(strftime('%%s','now') - sig_time as real) delta\n"
|
||||||
" from signatures) ss\n"
|
" from signatures) ss\n"
|
||||||
" left join bindings on ss.binding = bindings.oid)\n"
|
" on ss.binding = bindings.oid)\n"
|
||||||
" where email = %Q\n"
|
" where email = %Q\n"
|
||||||
" group by fingerprint, time_ago\n"
|
" group by fingerprint, time_ago\n"
|
||||||
/* Make sure the current key is first. */
|
/* Make sure the current key is first. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user