From 99ff23dad478d790d31b01a311424096e6b65f02 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 10 Mar 2008 16:15:13 +0000 Subject: [PATCH] Fix nodech for noderanges again (shallow copy was breaking it) git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@739 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/lib/xcat/plugins/tabutils.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xCAT-server-2.0/lib/xcat/plugins/tabutils.pm b/xCAT-server-2.0/lib/xcat/plugins/tabutils.pm index 88fae3198..89a82a5bd 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/tabutils.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/tabutils.pm @@ -611,10 +611,10 @@ sub nodech { #my $op = $tables{$tab}->{$_}->[1]; #my $val = $tables{$tab}->{$_}->[0]; - my $valoppairs = $tables{$tab}->{$_}; - while (scalar(@$valoppairs)) { # alternating list of value and op for this table.column - my $val = shift @$valoppairs; - my $op = shift @$valoppairs; + my @valoppairs = @{$tables{$tab}->{$_}}; #Deep copy + while (scalar(@valoppairs)) { # alternating list of value and op for this table.column + my $val = shift @valoppairs; + my $op = shift @valoppairs; my $key = $_; if ($op eq '=') { $uhsh{$key} = $val; @@ -651,7 +651,7 @@ sub nodech } } #else, what they asked for is the case alredy } - } # end of while $valoppairs + } # end of while @valoppairs } # end of foreach column specified for this table if (keys %uhsh)