summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2013-10-30 11:32:36 +0100
committerGravatar Christian Hesse <mail@eworm.de>2013-10-30 11:32:36 +0100
commit4844cf8625f635baaa0d3c31182e34f89ec70bc5 (patch)
tree2c9e62e8414ef7484277b62603d036a739c2d805
parent8ae44b24b8282492ac9573169d4d6b065fe7a9a5 (diff)
downloadpacredir-4844cf8625f635baaa0d3c31182e34f89ec70bc5.tar.gz
pacredir-4844cf8625f635baaa0d3c31182e34f89ec70bc5.tar.zst
reset bad status for hosts on SIGHUP
-rw-r--r--pacredir.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pacredir.c b/pacredir.c
index dd1ea55..7867cff 100644
--- a/pacredir.c
+++ b/pacredir.c
@@ -368,11 +368,11 @@ void sigterm_callback(int signal) {
void sighup_callback(int signal) {
struct hosts * tmphosts = hosts;
- write_log(stdout, "Received SIGHUP, marking all hosts offline.\n");
+ write_log(stdout, "Received SIGHUP, resetting bad status for hosts.\n");
while (tmphosts->host != NULL) {
- tmphosts->pacserve.online = 0;
- tmphosts->pacdbserve.online = 0;
+ tmphosts->pacserve.bad = 0;
+ tmphosts->pacdbserve.bad = 0;
tmphosts = tmphosts->next;
}
}