changed device_type() to not falsepositive for Bay and HP classes. Changed error_throw to not give line feeds.
This commit is contained in:
6
Info.pm
6
Info.pm
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user