next if($cgiparams{$blocklist} ne "on");
# Get the file name which keeps the converted blocklist.
- my $ipset_db_file = &IPblocklist::get_ipset_db_file($blocklist);
+ my $cached_file = &IPblocklist::get_cached_blocklist_file($blocklist);
# Check if the blocklist already has been downloaded.
- if(-f "$ipset_db_file") {
+ if(-f "$cached_file") {
# Blocklist already exits, we can skip it.
next;
} else {
# Loop over the array of missing blocklists.
foreach my $missing_blocklist (@missing_blocklists) {
# Call the download and convert function to get the missing blocklist.
- my $status = &IPblocklist::download_and_create_blocklist($missing_blocklist);
+ my $status = &IPblocklist::download_blocklist($missing_blocklist);
# Check if there was an error during download.
if ($status eq "dl_error") {