Skip to content

Commit

Permalink
fix: fix typos and syntax from previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
g-bougard committed Sep 28, 2020
1 parent 1275168 commit 4e5f4e0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/FusionInventory/Agent/SNMP/MibSupport/Multitech.pm
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ sub getSnmpHostname {
my $serial = $self->getSerial()
or return;

return $self->{MODEL}.'_'.$serial;
my $device = $self->device
or return;

return $device->{MODEL}.'_'.$serial;
}

sub getModel {
Expand Down
3 changes: 3 additions & 0 deletions lib/FusionInventory/Agent/SNMP/MibSupport/Ricoh.pm
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ sub getModel {
sub getSnmpHostname {
my ($self) = @_;

my $device = $self->device
or return;

my $hostname = getCanonicalString($self->get(hostname));

# Don't override if found hostname is manufacturer+model
Expand Down
2 changes: 1 addition & 1 deletion lib/FusionInventory/Agent/SNMP/MibSupport/Siemens.pm
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ sub getSnmpHostname {
return $name if $name;

my $serial = $self->getSerial()
or return:
or return;

return $serial;
}
Expand Down

0 comments on commit 4e5f4e0

Please sign in to comment.