From e77fd3d5ccd8b5f9af0a9055acdca9052eebd1c1 Mon Sep 17 00:00:00 2001 From: slerena Date: Thu, 10 Jun 2010 09:25:26 +0000 Subject: [PATCH] 2010-06-10 Sancho Lerena * lib/PandoraFMS/Core.pm: Redefine downtime name and description if not defined. * lib/PandoraFMS/Tools.pm: Octopus is now known as Octopods. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2900 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 7 +++++++ pandora_server/lib/PandoraFMS/Core.pm | 8 ++++++++ pandora_server/lib/PandoraFMS/Tools.pm | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 3579aea851..b078d5310a 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,10 @@ +2010-06-10 Sancho Lerena + + * lib/PandoraFMS/Core.pm: Redefine downtime name and description if + not defined. + + * lib/PandoraFMS/Tools.pm: Octopus is now known as Octopods. + 2010-06-09 Ramon Novoa * conf/pandora_server.conf: Set the default server_threshold to 5 diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index b36f62613d..d52194d3fa 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -789,6 +789,14 @@ sub pandora_planned_downtime ($$) { foreach my $downtime (@downtimes) { + if (!defined($downtime->{'description'})){ + $downtime->{'description'} = "N/A"; + } + + if (!defined($downtime->{'name'})){ + $downtime->{'name'} = "N/A"; + } + logger($pa_config, "Starting planned downtime '" . $downtime->{'name'} . "'.", 10); db_do($dbh, 'UPDATE tplanned_downtime SET executed = 1 WHERE id = ?', $downtime->{'id'}); diff --git a/pandora_server/lib/PandoraFMS/Tools.pm b/pandora_server/lib/PandoraFMS/Tools.pm index 4e99d1a58a..3490fe9dd8 100644 --- a/pandora_server/lib/PandoraFMS/Tools.pm +++ b/pandora_server/lib/PandoraFMS/Tools.pm @@ -104,7 +104,7 @@ sub pandora_get_os ($) { elsif ($command =~ m/3com/i){ return 11; } - elsif ($command =~ m/Octopus/i){ + elsif ($command =~ m/Octopods/i){ return 13; } elsif ($command =~ m/BSD/i){