chiark / gitweb /
dimrngr: Avoid need for hkp housekeeping.
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Sat, 29 Oct 2016 06:00:50 +0000 (02:00 -0400)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Tue, 3 Jan 2017 20:39:52 +0000 (20:39 +0000)
commit64b6b627c00d4fef2d2a25cf1d2db0f0a904d181
tree490e7599aee916520c86c9c5ed38a4150140245c
parent051a2489e6b1081c0a20a0b12e56e25eff464ccd
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>
Gbp-Pq: Topic dirmngr-idling
Gbp-Pq: Name 0002-dimrngr-Avoid-need-for-hkp-housekeeping.patch
dirmngr/dirmngr.c
dirmngr/dirmngr.h
dirmngr/ks-engine-hkp.c