ossp-pkg/snmpdx/snmpdx.d/sysFs.pm 1.1 -> 1.2
--- sysFs.pm 2003/09/08 12:50:17 1.1
+++ sysFs.pm 2003/09/08 14:34:56 1.2
@@ -76,7 +76,7 @@
my $col = $1;
my $row = ($2 > 0 ? $2 - 1 : 0);
$self->{-ctx}->{-log}->printf(4, "col=%s row=%s", $col, $row);
- $obj->{-value} = @sysFsInfoENTRY[$row]->{$col} if (defined @sysFsInfoENTRY[$row]->{$col});
+ $obj->{-value} = @sysFsInfoENTRY[$row]->{$col} if (defined @sysFsInfoENTRY[$row] and defined @sysFsInfoENTRY[$row]->{$col});
}
}
elsif ($self->{-ctx}->{-platform}->id() =~ m/Linux/i) {
@@ -119,7 +119,7 @@
my $col = $1;
my $row = ($2 > 0 ? $2 - 1 : 0);
$self->{-ctx}->{-log}->printf(4, "col=%s row=%s", $col, $row);
- $obj->{-value} = @sysFsInfoENTRY[$row]->{$col} if (defined @sysFsInfoENTRY[$row]->{$col});
+ $obj->{-value} = @sysFsInfoENTRY[$row]->{$col} if (defined @sysFsInfoENTRY[$row] and defined @sysFsInfoENTRY[$row]->{$col});
}
}
elsif($self->{-ctx}->{-platform}->id() =~ m/SunOS/i) {
@@ -162,7 +162,7 @@
my $col = $1;
my $row = ($2 > 0 ? $2 - 1 : 0);
$self->{-ctx}->{-log}->printf(4, "col=%s row=%s", $col, $row);
- $obj->{-value} = @sysFsInfoENTRY[$row]->{$col} if (defined @sysFsInfoENTRY[$row]->{$col});
+ $obj->{-value} = @sysFsInfoENTRY[$row]->{$col} if (defined @sysFsInfoENTRY[$row] and defined @sysFsInfoENTRY[$row]->{$col});
}
}
return;
|
|