From ea8275677bb405b02415e5c290d4fd51cabebb23 Mon Sep 17 00:00:00 2001 From: Max Baker <> Date: Mon, 28 Jul 2003 16:22:36 +0000 Subject: [PATCH] changed device_type() to not falsepositive for Bay and HP classes. Changed error_throw to not give line feeds. --- Info.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Info.pm b/Info.pm index cb33e49f..18f3557a 100644 --- a/Info.pm +++ b/Info.pm @@ -639,10 +639,10 @@ sub device_type { $objtype = 'SNMP::Info::Layer3::C3550' if ($desc =~ /C3550/); # HP - $objtype = 'SNMP::Info::Layer2::HP' if ($desc =~ /hp/i); + $objtype = 'SNMP::Info::Layer2::HP' if ($desc =~ /HP.*ProCurve/); # Bay Switch - $objtype = 'SNMP::Info::Layer2::Bay' if ($desc =~ /bay/i); + $objtype = 'SNMP::Info::Layer2::Bay' if ($desc =~ /BayStack/); # Aironet $objtype = 'SNMP::Info::Layer2::Aironet' if ($desc =~ /C1100/); @@ -1695,7 +1695,7 @@ sub error_throw { $self->{error} = $error; if ($self->debug()){ - $error .= "\n" unless $error =~ /\n$/; + $error =~ s/\n+$//; carp($error); } }