diff options
-rw-r--r-- | pacredir.c | 15 | ||||
-rw-r--r-- | pacredir.conf | 4 |
2 files changed, 2 insertions, 17 deletions
@@ -33,7 +33,7 @@ struct hosts * hosts = NULL; struct ignore_interfaces * ignore_interfaces = NULL; int max_threads = 0; static AvahiSimplePoll *simple_poll = NULL; -uint8_t verbose = 0, ignore_db_files = 0; +uint8_t verbose = 0; unsigned int count_redirect = 0, count_not_found = 0; /*** write_log ***/ @@ -429,12 +429,6 @@ static mhd_result ahc_echo(void * cls, dbfile = 1; - /* return 404 if database file are disabled */ - if (ignore_db_files > 0) { - http_code = MHD_HTTP_NOT_FOUND; - goto response; - } - /* get timestamp from request */ if ((if_modified_since = MHD_lookup_connection_value(connection, MHD_HEADER_KIND, MHD_HTTP_HEADER_IF_MODIFIED_SINCE))) { @@ -568,9 +562,7 @@ response: ret = MHD_queue_response(connection, MHD_HTTP_TEMPORARY_REDIRECT, response); free(url); } else { - if (dbfile > 0 && ignore_db_files > 0) - write_log(stdout, "Ignoring request for db file %s.\n", basename); - else if (req_count < 0) + if (req_count < 0) write_log(stdout, "Currently no peers are available to check for %s.\n", basename); else if (dbfile > 0) @@ -707,9 +699,6 @@ int main(int argc, char ** argv) { if (verbose > 0 && max_threads > 0) write_log(stdout, "Limiting number of threads to a maximum of %d\n", max_threads); - /* whether to ignore db files */ - ignore_db_files = iniparser_getboolean(ini, "general:ignore db files", ignore_db_files); - /* store interfaces to ignore */ if ((inistring = iniparser_getstring(ini, "general:ignore interfaces", NULL)) != NULL) { values = strdup(inistring); diff --git a/pacredir.conf b/pacredir.conf index 0cbd667..e0d86ab 100644 --- a/pacredir.conf +++ b/pacredir.conf @@ -10,10 +10,6 @@ max threads = 0 #max threads = 32 -# Set this to true if you want to ignore database files, to always download -# them from mirrors. -ignore db files = false - # Some people like to run avahi on network interfaces with low bandwidth or # high cost, for example to use 'Bonjour' (Link-Local Messaging) on it. # Add these interfaces here to ignore them by pacredir. Just give multiple |