From da7655af1880673f61095f871b8c65417bf95c8d Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Thu, 19 Feb 2009 00:45:53 +0000 Subject: [PATCH] -Fix problem where xcatd would 'BUG' if a table didn't exist at all when trying to determine a command handler git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2770 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/sbin/xcatd | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xCAT-server/sbin/xcatd b/xCAT-server/sbin/xcatd index 6082a5c14..8feb74dcb 100755 --- a/xCAT-server/sbin/xcatd +++ b/xCAT-server/sbin/xcatd @@ -671,10 +671,14 @@ sub plugin_command { unless (@nodes) { #register the plugin in the event of usage $handler_hash{$ownmod} = 1; } - my $hdlrcache = $hdlrtable->getNodesAttribs(\@nodes,\@columns); + my $hdlrcache; + if ($hdlrtable) { + $hdlrcache = $hdlrtable->getNodesAttribs(\@nodes,\@columns); + } foreach $node (@nodes) { + unless ($hdlrcache) { next; } my $attribs = $hdlrcache->{$node}->[0]; #$hdlrtable->getNodeAttribs($node,\@columns); - unless (defined($attribs)) { next; } #TODO: This really ought to craft an unsupported response for this request + unless (defined($attribs)) { next; } foreach (@columns) { my $col=$_; if (defined($attribs->{$col})) {