From ecd4f30a7c4e67549a4133db45e022613f2ecbcf Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 11 Apr 2008 18:07:55 +0000 Subject: [PATCH] -Fix new usage semantic to use list reference syntax -Fix empty requests in UDP service from BUGing with getUsage git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1023 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/lib/xcat/plugins/blade.pm | 5 ++++- xCAT-server-2.0/lib/xcat/plugins/ipmi.pm | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/xCAT-server-2.0/lib/xcat/plugins/blade.pm b/xCAT-server-2.0/lib/xcat/plugins/blade.pm index 80f2fff71..9c66ce120 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/blade.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/blade.pm @@ -1195,10 +1195,13 @@ sub process_request { my $noderange = $request->{node}; my $command = $request->{command}->[0]; my @exargs; + unless ($command) { + return; #Empty request + } unless ($noderange or $command eq "findme") { my $usage_string=xCAT::Usage->getUsage($command); if ($usage_string) { - $callback->({data=>$usage_string}); + $callback->({data=>[$usage_string]}); $request = {}; } return; diff --git a/xCAT-server-2.0/lib/xcat/plugins/ipmi.pm b/xCAT-server-2.0/lib/xcat/plugins/ipmi.pm index ce6df590b..6f91b8458 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/ipmi.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/ipmi.pm @@ -4577,7 +4577,7 @@ sub process_request { unless ($noderange) { my $usage_string=xCAT::Usage->getUsage($command); if ($usage_string) { - $callback->({data=>$usage_string}); + $callback->({data=>[$usage_string]}); $request = {}; } return;