]> git.ipfire.org Git - people/stevee/guardian.git/blobdiff - modules/Parser.pm
Only process any actions on events if the corresponding parser returns one.
[people/stevee/guardian.git] / modules / Parser.pm
index 9c3fc87130204d8bbb674a4afdb7eecb2c0041d2..13715e004dcd7fe5d8115e6d492c463b8fe32dc7 100644 (file)
@@ -30,8 +30,14 @@ sub Parser ($$) {
        # Call responsible message parser.
        my $action = $logfile_parsers{$parser}->(@message);
 
-       # Return which action should be performed.
-       return "count $action";
+       # In case an action has been returned, return it too. 
+       if (defined($action)) {
+               # Return which action should be performed.
+               return "count $action";
+       }
+
+       # Return undef, no action required.
+       return undef;
 }
 
 #