2011-11-04 Koichiro Kikuchi <koichiro@rworks.jp>

* lib/PandoraFMS/Core.pm: Avoid warning message intrduced by last
	  commit.
 


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5112 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
koichirok 2011-11-04 08:21:07 +00:00
parent 2be96b4f94
commit 6c531101af
2 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2011-11-04 Koichiro Kikuchi <koichiro@rworks.jp>
* lib/PandoraFMS/Core.pm: Avoid warning message intrduced by last
commit.
2011-11-04 Koichiro Kikuchi <koichiro@rworks.jp>
* lib/PandoraFMS/Core.pm: Added missing safe_output to decode

View File

@ -1904,7 +1904,7 @@ sub get_module_status ($$$) {
my ($data, $module, $module_type) = @_;
my ($critical_min, $critical_max, $warning_min, $warning_max) =
($module->{'min_critical'}, $module->{'max_critical'}, $module->{'min_warning'}, $module->{'max_warning'});
my ($critical_str, $warning_str) = map { safe_output($_) } ($module->{'str_critical'}, $module->{'str_warning'});
my ($critical_str, $warning_str) = ($module->{'str_critical'}, $module->{'str_warning'});
# Was the module status set in the XML data file?
if (defined ($module->{'status'})) {
@ -1914,8 +1914,8 @@ sub get_module_status ($$$) {
}
# Set default critical max/min/str values
$critical_str = '' unless defined ($critical_str);
$warning_str = '' unless defined ($warning_str);
$critical_str = defined ($critical_str) ? safe_output($critical_str) : '';
$warning_str = defined ($warning_str)? safe_output($warning_str) : '';
if ($module_type =~ m/_proc$/ && ($critical_min eq $critical_max)) {
($critical_min, $critical_max) = (0, 1);