From 99f4de86e3537b13a8375117537a55daff1bb9f2 Mon Sep 17 00:00:00 2001 From: yinle Date: Sat, 19 Feb 2011 09:55:34 +0000 Subject: [PATCH] FSP/BPA redundancy: add process of the wrong condition, fix some mistakes. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8891 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/DBobjUtils.pm | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/perl-xCAT/xCAT/DBobjUtils.pm b/perl-xCAT/xCAT/DBobjUtils.pm index 208dd984d..275c8d44d 100644 --- a/perl-xCAT/xCAT/DBobjUtils.pm +++ b/perl-xCAT/xCAT/DBobjUtils.pm @@ -2095,16 +2095,21 @@ sub getchildren } } } - unless ( $port ) + if ( !defined($port )) { return \@children; } else { my $vpdtab = xCAT::Table->new( 'vpd' ); my $sides = $vpdtab->getNodesAttribs(\@children, ['side']); + if(!$sides) + { + return undef; + } for my $n (@children) { - if ($sides->{$n}->{side} =~ /$port/) + my $nside = $sides->{$n}->[0]; + if ($nside->{side} =~ /$port/) { push @children_prot, $n; } @@ -2299,7 +2304,7 @@ sub judge_node } if ($type =~ /^fsp$/) { - if ($nodeparent->{parent} =~ /^cec$/) + if ($parenttype =~ /^cec$/) { $flag = 1; } else @@ -2307,9 +2312,9 @@ sub judge_node $flag = 0; } } - + if ($type =~ /^bpa$/) { - if ($nodeparent->{parent} =~ /^frame$/) + if ($parenttype =~ /^frame$/) { $flag = 1; } else