aboutsummaryrefslogtreecommitdiffstats
path: root/dirmngr/ks-engine-hkp.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2017-01-23 12:07:54 +0000
committerWerner Koch <[email protected]>2017-01-23 12:07:54 +0000
commit3ca3da8fc4ef802b8cceec5fde398a07b4888848 (patch)
tree4893f5788e8429f20675b72ce6b24804a8cd1a63 /dirmngr/ks-engine-hkp.c
parentlibdns: Hack to skip negation term. (diff)
downloadgnupg-3ca3da8fc4ef802b8cceec5fde398a07b4888848.tar.gz
gnupg-3ca3da8fc4ef802b8cceec5fde398a07b4888848.zip
dirmngr: On SIGHUP mark all keyservers alive.
* dirmngr/ks-engine-hkp.c (ks_hkp_reload): New. * dirmngr/dirmngr.c (dirmngr_sighup_action): Call it. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'dirmngr/ks-engine-hkp.c')
-rw-r--r--dirmngr/ks-engine-hkp.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/dirmngr/ks-engine-hkp.c b/dirmngr/ks-engine-hkp.c
index 08ef851b4..9de62674a 100644
--- a/dirmngr/ks-engine-hkp.c
+++ b/dirmngr/ks-engine-hkp.c
@@ -1003,6 +1003,29 @@ ks_hkp_housekeeping (time_t curtime)
}
+/* Reload (SIGHUP) action for this module. We mark all host alive
+ * even those which have been manually shot. */
+void
+ks_hkp_reload (void)
+{
+ int idx, count;
+ hostinfo_t hi;
+
+ for (idx=count=0; idx < hosttable_size; idx++)
+ {
+ hi = hosttable[idx];
+ if (!hi)
+ continue;
+ if (!hi->dead)
+ continue;
+ hi->dead = 0;
+ count++;
+ }
+ if (count)
+ log_info ("number of resurrected hosts: %d", count);
+}
+
+
/* Send an HTTP request. On success returns an estream object at
R_FP. HOSTPORTSTR is only used for diagnostics. If HTTPHOST is
not NULL it will be used as HTTP "Host" header. If POST_CB is not