aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2014-01-20 10:56:57 +0100
committerGravatar Christian Hesse <mail@eworm.de>2014-01-20 10:56:57 +0100
commita1863559a27d580dea90b584ccffc8c1531a6526 (patch)
tree75e7e3093c7ca7d35257fc9eb369277259390d7e
parent13adfef5dedbc3c2d452d2903d3a9ee6d2ff0a42 (diff)
downloadpacredir-a1863559a27d580dea90b584ccffc8c1531a6526.tar.gz
pacredir-a1863559a27d580dea90b584ccffc8c1531a6526.tar.zst
make output a bit more verbose
-rw-r--r--pacredir.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/pacredir.c b/pacredir.c
index a148257..1914131 100644
--- a/pacredir.c
+++ b/pacredir.c
@@ -425,7 +425,12 @@ static int ahc_echo(void * cls, struct MHD_Connection * connection, const char *
ret = MHD_queue_response(connection, MHD_HTTP_TEMPORARY_REDIRECT, response);
free(url);
} else {
- write_log(stdout, "File %s not found on %d servers, giving up.\n", basename, req_count + 1);
+ if (req_count < 0)
+ write_log(stdout, "Currently no servers are available to check for %s.\n", basename);
+ else if (dbfile == 1)
+ write_log(stdout, "No more recent version of %s found on %d servers.\n", basename, req_count + 1);
+ else
+ write_log(stdout, "File %s not found on %d servers, giving up.\n", basename, req_count + 1);
page = malloc(strlen(PAGE404) + strlen(basename) + 1);
sprintf(page, PAGE404, basename + 1);
response = MHD_create_response_from_data(strlen(page), (void*) page, MHD_NO, MHD_NO);