Check-in Number:
|
3565 | |
Date: |
2003-Sep-08 16:34:56 (local)
2003-Sep-08 14:34:56 (UTC) |
User: | thl |
Branch: | |
Comment: |
avoid referencing undefined hash |
Tickets: |
|
Inspections: |
|
Files: |
|
ossp-pkg/snmpdx/snmpdx.d/hwCpu.pm 1.4 -> 1.5
--- hwCpu.pm 2003/09/08 13:42:05 1.4
+++ hwCpu.pm 2003/09/08 14:34:56 1.5
@@ -117,7 +117,7 @@
my $col = $1;
my $row = ($2 > 0 ? $2 - 1 : 0);
$self->{-ctx}->{-log}->printf(4, "col=%s row=%s", $col, $row);
- $obj->{-value} = @hwCpuInfoENTRY[$row]->{$col} if (defined @hwCpuInfoENTRY[$row]->{$col});
+ $obj->{-value} = @hwCpuInfoENTRY[$row]->{$col} if (defined @hwCpuInfoENTRY[$row] and defined @hwCpuInfoENTRY[$row]->{$col});
}
}
return;
|
|
ossp-pkg/snmpdx/snmpdx.d/hwDisk.pm 1.1 -> 1.2
--- hwDisk.pm 2003/09/08 13:43:05 1.1
+++ hwDisk.pm 2003/09/08 14:34:56 1.2
@@ -77,7 +77,7 @@
my $col = $1;
my $row = ($2 > 0 ? $2 - 1 : 0);
$self->{-ctx}->{-log}->printf(4, "col=%s row=%s", $col, $row);
- $obj->{-value} = @hwDiskInfoENTRY[$row]->{$col} if (defined @hwDiskInfoENTRY[$row]->{$col});
+ $obj->{-value} = @hwDiskInfoENTRY[$row]->{$col} if (defined @hwDiskInfoENTRY[$row] and defined @hwDiskInfoENTRY[$row]->{$col});
}
}
return;
|
|
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;
|
|