aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2022-02-10 14:41:19 +0100
committerGravatar Christian Hesse <mail@eworm.de>2023-11-24 08:31:59 +0100
commite4fb574acba84e51feab84f79c317f68da363b85 (patch)
tree586beccc708882b65f0e3cb857f85317fc0ff728
parentcc57e3469b9475e06ab1d5fd2093e1ae563e54eb (diff)
downloadpacredir-e4fb574acba84e51feab84f79c317f68da363b85.tar.gz
pacredir-e4fb574acba84e51feab84f79c317f68da363b85.tar.zst
drop setting to ignore db files...
Using just `CacheServer` (with commented `Server`) in pacman configuration has the same effect.
-rw-r--r--pacredir.c15
-rw-r--r--pacredir.conf4
2 files changed, 2 insertions, 17 deletions
diff --git a/pacredir.c b/pacredir.c
index 9fa5921..c54d344 100644
--- a/pacredir.c
+++ b/pacredir.c
@@ -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 ***/
@@ -424,12 +424,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))) {
@@ -563,9 +557,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)
@@ -703,9 +695,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