From 270a784f1ce09d8477a5989f44a32f4641da2c97 Mon Sep 17 00:00:00 2001 From: jjhua Date: Thu, 8 Apr 2010 07:39:15 +0000 Subject: [PATCH] fixed the defect 2979358 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5713 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/PPC.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/PPC.pm b/xCAT-server/lib/perl/xCAT/PPC.pm index 85e24d0d3..b6cb30844 100644 --- a/xCAT-server/lib/perl/xCAT/PPC.pm +++ b/xCAT-server/lib/perl/xCAT/PPC.pm @@ -1293,9 +1293,10 @@ sub preprocess_request { if ( ref($opt) eq 'ARRAY' ) { send_msg( $req, 1, @$opt ); + delete($req->{callback}); # if not, it will cause an error -- "Can't encode a value of type: CODE" in hierairchy. return(1); } - + delete($req->{callback}); # remove 'callback' => sub { "DUMMY" } in hierairchy. $req->{opt} = $opt; if ( exists( $req->{opt}->{V} )) { @@ -1422,7 +1423,7 @@ sub parse_args $req->{command} = $command; $req->{stdin} = $stdin; $req->{hwtype} = $package; - #$req->{callback} = $callback; + $req->{callback} = $callback; $req->{method} = "parse_args"; my $opt = runcmd( $req);