Skip to content

Commit

Permalink
doc: move comment to the right place
Browse files Browse the repository at this point in the history
  • Loading branch information
g-bougard committed Sep 26, 2018
1 parent 85f0dc1 commit 803b786
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/FusionInventory/Agent/SNMP/Mock.pm
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,6 @@ sub _setIndexedValues {
my $numerical = substr($first_line, 0, 1) eq '.' ? 1 : 0 ;
my $last_value;

# Prepare walk tree root with an empty node
# 1st value node will contain sub-nodes
# 2nd value will be the numder index
# 3rd value will be a hash of sub-index -> sub-node ref in 1st values
# 4th value will be a SNMP value array ref like [ TYPE, VALUE ] when
# a value should be stored
$self->{_walk} = {};

while (my $line = <$handle>) {
Expand Down Expand Up @@ -179,6 +173,12 @@ sub _setValue {
# Optimization: use 6 first oid digits as tree root key as they don't often change
my ($root, $nextoidpart) = $oid =~ /^(\.\d+\.\d+\.\d+\.\d+\.\d+\.\d+)(.*)$/
or return;
# Prepare walk tree roots with empty node while not exist
# 1st value node will contain sub-nodes
# 2nd value will be the numder index
# 3rd value will be a hash of sub-index -> sub-node ref in 1st values
# 4th value will be a SNMP value array ref like [ TYPE, VALUE ] when
# a value should be stored
$self->{_walk}->{$root} = [ [], undef, {}, undef ] unless exists($self->{_walk}->{$root});
$oid = $nextoidpart;

Expand Down

0 comments on commit 803b786

Please sign in to comment.