mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
ids-functions.pl: Improve logic to get the cached rulesfile of a provider
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
committed by
Michael Tremer
parent
0564584a58
commit
738ee72027
@@ -1027,11 +1027,14 @@ sub _store_error_message ($) {
|
||||
sub _get_dl_rulesfile($) {
|
||||
my ($provider) = @_;
|
||||
|
||||
# Check if the requested provider is known.
|
||||
if ($IDS::Ruleset::Providers{$provider}) {
|
||||
# Gather the download type for the given provider.
|
||||
my $dl_type = $IDS::Ruleset::Providers{$provider}{'dl_type'};
|
||||
# Abort if the requested provider is not known.
|
||||
return unless($IDS::Ruleset::Providers{$provider});
|
||||
|
||||
# Try to gather the download type for the given provider.
|
||||
my $dl_type = $IDS::Ruleset::Providers{$provider}{'dl_type'};
|
||||
|
||||
# Check if a download type could be grabbed.
|
||||
if ($dl_type) {
|
||||
# Obtain the file suffix for the download file type.
|
||||
my $suffix = $dl_type_to_suffix{$dl_type};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user