From 1ac848c4838fdcb3bba8f70e8028571f8237d400 Mon Sep 17 00:00:00 2001 From: ramonn Date: Tue, 6 Sep 2011 21:51:18 +0000 Subject: [PATCH] 2011-09-06 Ramon Novoa * lib/PandoraFMS/Core.pm: Fixed action search for event alerts. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4925 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 4 ++++ pandora_server/lib/PandoraFMS/Core.pm | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 53982b1553..c4d3d43bca 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,7 @@ +2011-09-06 Ramon Novoa + + * lib/PandoraFMS/Core.pm: Fixed action search for event alerts. + 2011-09-06 Ramon Novoa * lib/PandoraFMS/NmapParser.pm: Remove nmap warnings from output. diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 23bdb2a31a..ab24224286 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -633,11 +633,10 @@ sub pandora_execute_alert ($$$$$$$$;$) { @actions = get_db_rows ($dbh, 'SELECT * FROM tevent_alert_action, talert_actions, talert_commands WHERE tevent_alert_action.id_alert_action = talert_actions.id AND talert_actions.id_alert_command = talert_commands.id - AND tevent_alert_action.id = ? + AND tevent_alert_action.id_event_alert = ? AND ((fires_min = 0 AND fires_max = 0) OR (? >= fires_min AND ? <= fires_max))', - $alert->{'id'}, $alert->{'times_fired'}, $alert->{'times_fired'}); - + $alert->{'id'}, $alert->{'times_fired'}, $alert->{'times_fired'}); # Get default action if ($#actions < 0) { @actions = get_db_rows ($dbh, 'SELECT * FROM talert_actions, talert_commands