Skip to content

Commit

Permalink
simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
guillomovitch committed Jun 18, 2011
1 parent bd41d3a commit 05f4c46
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions lib/FusionInventory/Agent/Task/NetDiscovery.pm
Expand Up @@ -651,16 +651,10 @@ sub _discoverBySNMP {
my ($self, $device, $ip, $credentials, $dico, $entity) = @_;

$self->{logger}->debug("[ip] : SNMP discovery");
my $i = "4";
my $snmpv;
while ($i != 1) {
$i--;
$snmpv = $i;
if ($i == 2) {
$snmpv = "2c";
}

foreach my $version (qw(3 2c 1)) {
foreach my $credential (@{$credentials}) {
next unless $credential->{VERSION} eq $snmpv;
next unless $credential->{VERSION} eq $version;

my $session = FusionInventory::Agent::SNMP->new(
version => $credential->{VERSION},
Expand Down

0 comments on commit 05f4c46

Please sign in to comment.