]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/ids.cgi
ids.cgi: Display return code on download error, when adding a new
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / ids.cgi
index a16d4fa0dbe15bf44a009c991360dc4a9c8a3bfc..3a408ff5d9ba8b7c191515ef44cc619eba5a8857 100644 (file)
@@ -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);