changed device_type() to not falsepositive for Bay and HP classes. Changed error_throw to not give line feeds.

This commit is contained in:
Max Baker
2003-07-28 16:22:36 +00:00
parent c0891ec8c0
commit ea8275677b

View File

@@ -639,10 +639,10 @@ sub device_type {
$objtype = 'SNMP::Info::Layer3::C3550' if ($desc =~ /C3550/); $objtype = 'SNMP::Info::Layer3::C3550' if ($desc =~ /C3550/);
# HP # HP
$objtype = 'SNMP::Info::Layer2::HP' if ($desc =~ /hp/i); $objtype = 'SNMP::Info::Layer2::HP' if ($desc =~ /HP.*ProCurve/);
# Bay Switch # Bay Switch
$objtype = 'SNMP::Info::Layer2::Bay' if ($desc =~ /bay/i); $objtype = 'SNMP::Info::Layer2::Bay' if ($desc =~ /BayStack/);
# Aironet # Aironet
$objtype = 'SNMP::Info::Layer2::Aironet' if ($desc =~ /C1100/); $objtype = 'SNMP::Info::Layer2::Aironet' if ($desc =~ /C1100/);
@@ -1695,7 +1695,7 @@ sub error_throw {
$self->{error} = $error; $self->{error} = $error;
if ($self->debug()){ if ($self->debug()){
$error .= "\n" unless $error =~ /\n$/; $error =~ s/\n+$//;
carp($error); carp($error);
} }
} }