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>
Mon, 18 Sep 2017 20:41:12 +0000 (21:41 +0100)
commit39963d75a770141060dd104f54c1fdc0cf12bbd6
treedfaa9feaefaf9f10fca82b03a09e3a0d42d47c2d
parentfe6a1536eac3296341777a40ecb9ad6f8bf3c1d1
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