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, 14 Feb 2017 00:29:34 +0000 (00:29 +0000)
commit10c75bbd9aa65e7792585833084d2c570ab1d6f6
treec3499880da5a3b7f468a378b94fee20b05ef8091
parent385e4dbd6cf07653e50df1edc18a897dd8dff6e0
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