From 2579c0aecd41679edb84d1a4b9099c2bf72cd227 Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Tue, 1 Jun 2010 12:20:10 +0000 Subject: [PATCH] 2010-06-01 Ramon Novoa * lib/PandoraFMS/SNMPServer.pm: Set default values to avoid warnings. Fixes bug #3009858. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2829 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 5 +++++ pandora_server/lib/PandoraFMS/SNMPServer.pm | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 2f8a3f1780..fbf319d17d 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,8 @@ +2010-06-01 Ramon Novoa + + * lib/PandoraFMS/SNMPServer.pm: Set default values to avoid warnings. + Fixes bug #3009858. + 2010-05-31 Sergio Martin * util/pandora_manage.pl: Fixed the help and the diff --git a/pandora_server/lib/PandoraFMS/SNMPServer.pm b/pandora_server/lib/PandoraFMS/SNMPServer.pm index 4681eec6c2..734e2bdb0e 100644 --- a/pandora_server/lib/PandoraFMS/SNMPServer.pm +++ b/pandora_server/lib/PandoraFMS/SNMPServer.pm @@ -129,8 +129,8 @@ sub pandora_snmptrapd { next if ($line !~ m/\[\*\*\]/); logger($pa_config, "Reading trap '$line'", 10); - my ($date, $time, $source, $oid, - $type, $type_desc, $value, $data) = split(/\[\*\*\]/, $line); + my ($date, $time, $source, $oid, $type, $type_desc, $value, $data) = ('', '', '', '', '', '', '', ''); + ($date, $time, $source, $oid, $type, $type_desc, $value, $data) = split(/\[\*\*\]/, $line); my $timestamp = $date . ' ' . $time; $value = limpia_cadena ($value);