From addd4ed9c4e83744606f06c4383c472edeaa662e Mon Sep 17 00:00:00 2001 From: zhaoertao Date: Wed, 22 Jan 2014 23:17:13 -0800 Subject: [PATCH] 3974 rinv failed for Fujitsu Blade Server --- xCAT-server/lib/xcat/plugins/ipmi.pm | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/ipmi.pm b/xCAT-server/lib/xcat/plugins/ipmi.pm index 01a6945cc..2834af3e6 100644 --- a/xCAT-server/lib/xcat/plugins/ipmi.pm +++ b/xCAT-server/lib/xcat/plugins/ipmi.pm @@ -2681,7 +2681,9 @@ sub add_fruhash { $fru->rec_type("hw"); } $fru->value($sessdata->{currfrudata}); - $fru->desc($sessdata->{currfrusdr}->id_string); + if (exists($sessdata->{currfrusdr})) { + $fru->desc($sessdata->{currfrusdr}->id_string); + } $sessdata->{fru_hash}->{$sessdata->{frudex}} = $fru; $sessdata->{frudex} += 1; } elsif ($sessdata->{currfrutype} and $sessdata->{currfrutype} eq 'dimm') { @@ -2699,9 +2701,13 @@ sub add_fruhash { $fru->rec_type("hw"); } $fru->value($err); - $fru->desc($sessdata->{currfrusdr}->id_string); - $sessdata->{fru_hash}->{$sessdata->{frudex}} = $fru; - $sessdata->{frudex} += 1; + if (exists($sessdata->{currfrusdr})) { + $fru->desc($sessdata->{currfrusdr}->id_string); + } + if (exists($sessdata->{frudex})) { + $sessdata->{fru_hash}->{$sessdata->{frudex}} = $fru; + $sessdata->{frudex} += 1; + } undef $sessdata->{currfrudata}; #skip useless calls to add more frus when parsing failed miserably anyway #xCAT::SvrUtils::sendmsg([1,":Error reading fru area ".$sessdata->{currfruid}.": $err"],$callback);