From a1863559a27d580dea90b584ccffc8c1531a6526 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 20 Jan 2014 10:56:57 +0100 Subject: make output a bit more verbose --- pacredir.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3-70-g09d2