From 448c709aed280b4f764c6cc0f7bfb0208cc1ff8e Mon Sep 17 00:00:00 2001 From: yinle Date: Sat, 11 Aug 2012 11:03:54 +0000 Subject: [PATCH] Fix some mistakes; add control to invoke disconnect. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13490 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/PPCfsp.pm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/perl-xCAT/xCAT/PPCfsp.pm b/perl-xCAT/xCAT/PPCfsp.pm index 25801e98c..a46acf748 100644 --- a/perl-xCAT/xCAT/PPCfsp.pm +++ b/perl-xCAT/xCAT/PPCfsp.pm @@ -52,6 +52,7 @@ sub handler { my $server = shift; my $request = shift; my $exp = shift; + my $flag = shift; ##################################### # Convert command to correct format @@ -76,7 +77,9 @@ sub handler { ##################################### # Disconnect from FSP ##################################### + unless ($flag) { xCAT::PPCfsp::disconnect( $exp ); + } return( \@outhash ); } @@ -370,7 +373,10 @@ sub process_cmd { # Return error ################################## if ( !$res->is_success() ) { - return( [RC_ERROR,$res->status_line] ); + my @tmpres = (RC_ERROR, $res->status_line); + my @rs; + push @rs, \@tmpres; + return(\@rs ); } ################################## # Build hash of expanded menus @@ -386,7 +392,10 @@ sub process_cmd { ############################## my $form = $menu{$cmds{$command}{$_}[0]}; if ( !defined( $form )) { - return( [RC_ERROR,"Cannot find '$cmds{$command}{$_}[0]' menu"] ); + my @tmpres = (RC_ERROR, "Cannot find '$cmds{$command}{$_}[0]' menu"); + my @rs; + push @rs, \@tmpres; + return(\@rs ); } ################################## # Run command