diff options
author | Christian Hesse <mail@eworm.de> | 2016-10-11 13:10:55 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2016-10-11 13:10:55 +0200 |
commit | 6a2d922bd8ed22c3cf21bceb6c07b76c199fcecf (patch) | |
tree | f8f8b0e893fca7d2e1065c80a7ecbcea66edb8e8 /pacredir.c | |
parent | 40457d78c69f6376148dce073531f8d36762c8fa (diff) | |
download | pacredir-6a2d922bd8ed22c3cf21bceb6c07b76c199fcecf.tar.gz pacredir-6a2d922bd8ed22c3cf21bceb6c07b76c199fcecf.tar.zst |
differentiate between offline and bad
Diffstat (limited to 'pacredir.c')
-rw-r--r-- | pacredir.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -373,7 +373,12 @@ static int ahc_echo(void * cls, time_t badtime = service->badtime + service->badcount * BADTIME; /* skip host if offline or had a bad request within last BADTIME seconds */ - if (service->online == 0 || badtime > tv.tv_sec) { + if (service->online == 0) { + write_log(stdout, "Service %s on host %s is offline, skipping\n", + dbfile ? PACDBSERVE : PACSERVE, tmphosts->host); + tmphosts = tmphosts->next; + continue; + } else if (badtime > tv.tv_sec) { /* write the time to buffer ctime, then strip the line break */ ctime_r(&badtime, ctime); ctime[strlen(ctime) - 1] = '\0'; |