Page MenuHome GnuPG

915_0002-dimrngr-Avoid-need-for-hkp-housekeeping.patch
Needs ReviewPublic

Authored by dkg on Nov 23 2016, 5:34 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Date: Sat, 29 Oct 2016 02:00:50 -0400
Subject: dimrngr: Avoid need for hkp housekeeping.

  • dirmngr/ks-engine-hkp.c (host_is_alive): New function. Test whether

host is alive and resurrects it if it has been dead long enough.
(select_random_host, map_host, ks_hkp_mark_host): Use host_is_alive
instead of testing hostinfo_t->dead directly.
(ks_hkp_housekeeping): Remove function, no longer needed.

  • dirmngr/dirmngr.c (housekeeping_thread): Remove call to

ks_hkp_housekeeping.

Rather than resurrecting hosts upon scheduled resurrection times, test
whether hosts should be resurrected as they're inspected for being
dead. This removes the need for explicit housekeeping, and makes host
resurrections happen "just in time", rather than being clustered on
HOUSEKEEPING_INTERVAL seconds.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>

dirmngr/dirmngr.c | 3 --
dirmngr/dirmngr.h | 4 ---
dirmngr/ks-engine-hkp.c | 73 ++++++++++++++++++++++++-------------------------
3 files changed, 36 insertions(+), 44 deletions(-)

Test Plan

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped