Skip to content

Commit

Permalink
explicit method calls
Browse files Browse the repository at this point in the history
  • Loading branch information
guillomovitch committed Jun 18, 2011
1 parent ba9ee29 commit bd41d3a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/FusionInventory/Agent/Task/NetDiscovery.pm
Original file line number Diff line number Diff line change
Expand Up @@ -623,25 +623,25 @@ sub _discoverByNetbios {
my $ns = $nb->node_status($ip);
return unless $ns;

for my $rr ($ns->names) {
if ($rr->suffix == 0 && $rr->G eq "GROUP") {
for my $rr ($ns->names()) {
if ($rr->suffix() == 0 && $rr->G() eq "GROUP") {
$device->{WORKGROUP} = getSanitizedString($rr->name);
}
if ($rr->suffix == 3 && $rr->G eq "UNIQUE") {
if ($rr->suffix() == 3 && $rr->G() eq "UNIQUE") {
$device->{USERSESSION} = getSanitizedString($rr->name);
}
if ($rr->suffix == 0 && $rr->G eq "UNIQUE") {
my $machine = $rr->name unless $rr->name =~ /^IS~/;
if ($rr->suffix() == 0 && $rr->G() eq "UNIQUE") {
my $machine = $rr->name() unless $rr->name() =~ /^IS~/;
$device->{NETBIOSNAME} = getSanitizedString($machine);
}
}

if (not exists($device->{MAC})) {
my $NetbiosMac = $ns->mac_address;
my $NetbiosMac = $ns->mac_address();
$NetbiosMac =~ tr/-/:/;
$device->{MAC} = $NetbiosMac;
} elsif ($device->{MAC} !~ /^([0-9a-f]{2}([:]|$)){6}$/i) {
my $NetbiosMac = $ns->mac_address;
my $NetbiosMac = $ns->mac_address();
$NetbiosMac =~ tr/-/:/;
$device->{MAC} = $NetbiosMac;
}
Expand Down

0 comments on commit bd41d3a

Please sign in to comment.