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
This commit is contained in:
yinle 2012-08-11 11:03:54 +00:00
parent ca15e05f2d
commit 448c709aed

View File

@ -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