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