]> git.ipfire.org Git - people/stevee/guardian.git/commitdiff
Enhance returned error messages from Event module.
authorStefan Schantl <stefan.schantl@ipfire.org>
Tue, 19 Jan 2016 12:57:26 +0000 (13:57 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Tue, 19 Jan 2016 12:57:26 +0000 (13:57 +0100)
Add details about the used FirewallEngine, when recieving any error
message from the responsible engine module. This information will be
quite usefull, in error case and help to debug the main problem.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
modules/Events.pm

index 67bef6081a5d9983348cc2e34b8ca067efe34cc8..7e0b687db55ed5cc7c104fc0c03dc280d21e6861 100644 (file)
@@ -203,8 +203,8 @@ sub CallBlock ($@) {
 
                # If we got back an error message something went wrong.
                if ($error) {
-                       # Exit function and return the error message.
-                       return $error;
+                       # Exit function and return the used FirewallEngine and the error message.
+                       return "$self->{FirewallEngine} - $error";
                } else {
                        # Address has been successfully blocked, print a log message.
                        $logger->Log("debug", "Address $address successfully has been blocked...");