Skip to content

Commit

Permalink
Fix physical memory error correction detection via WMI
Browse files Browse the repository at this point in the history
  • Loading branch information
g-bougard committed Aug 8, 2018
1 parent 5af7359 commit 722514e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
Revision history for FusionInventory agent

2.4.2 not released yet

inventory:
* Fix physical memory error correction detection via WMI under win32

2.4.1 Fri, 29 Jun 2018

core:
Expand Down
10 changes: 5 additions & 5 deletions lib/FusionInventory/Agent/Task/Inventory/Win32/Memory.pm
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ sub _getMemories {
foreach my $object (getWMIObjects(
class => 'Win32_PhysicalMemoryArray',
properties => [ qw/
MemoryDevices SerialNumber PhysicalMemoryCorrection
MemoryDevices SerialNumber MemoryErrorCorrection
/ ]
)) {

Expand All @@ -145,14 +145,14 @@ sub _getMemories {
$memory->{SERIALNUMBER} = $object->{SerialNumber};
}

if ($object->{PhysicalMemoryCorrection}) {
if ($object->{MemoryErrorCorrection}) {
$memory->{MEMORYCORRECTION} =
$memoryErrorProtection[$object->{PhysicalMemoryCorrection}];
if ($memory->{MEMORYCORRECTION}) {
$memory->{DESCRIPTION} .= " (".$memory->{MEMORYCORRECTION}.")";
}
}

if ($memory->{MEMORYCORRECTION}) {
$memory->{DESCRIPTION} .= " (".$memory->{MEMORYCORRECTION}.")";
}
}

return @memories;
Expand Down

0 comments on commit 722514e

Please sign in to comment.