From: Stefan Schantl Date: Sat, 16 Apr 2022 13:32:27 +0000 (+0200) Subject: ids.cgi: Display return code on download error, when adding a new X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5bad33e9a4bae9e15979087df3420c30dd5afd6c;p=people%2Fstevee%2Fipfire-2.x.git ids.cgi: Display return code on download error, when adding a new provider. Signed-off-by: Stefan Schantl --- diff --git a/html/cgi-bin/ids.cgi b/html/cgi-bin/ids.cgi index a16d4fa0db..3a408ff5d9 100644 --- a/html/cgi-bin/ids.cgi +++ b/html/cgi-bin/ids.cgi @@ -755,8 +755,11 @@ if ($cgiparams{'RULESET'} eq $Lang::tr{'ids apply'}) { &working_notice("$Lang::tr{'ids working'}"); # Download the ruleset. - if(&IDS::downloadruleset($provider)) { - $errormessage = "$Lang::tr{'ids could not add provider'} - $Lang::tr{'ids unable to download the ruleset'}"; + my $return = &IDS::downloadruleset($provider); + + # Check if the downloader returned a code. + if ($return) { + $errormessage = "$Lang::tr{'ids could not add provider'} - $Lang::tr{'ids unable to download the ruleset'}: $return"; # Call function to store the errormessage. &IDS::_store_error_message($errormessage);