Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 37AB5927A for ; Mon, 15 Dec 2014 08:43:31 +0000 (UTC) Received: (qmail 80815 invoked by uid 500); 15 Dec 2014 08:43:29 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 80703 invoked by uid 500); 15 Dec 2014 08:43:29 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 80394 invoked by uid 99); 15 Dec 2014 08:43:29 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Dec 2014 08:43:29 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 3EA969C6793; Mon, 15 Dec 2014 08:43:29 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: dahn@apache.org To: commits@cloudstack.apache.org Date: Mon, 15 Dec 2014 08:43:35 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [07/20] git commit: updated refs/heads/hotfix/scp-exception to 7de94c9 CLOUDSTACK-8067: Fixed NPEs in MS log related to console proxy VM Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1115bc9c Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1115bc9c Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1115bc9c Branch: refs/heads/hotfix/scp-exception Commit: 1115bc9cc6ebf2b321bb5a3ff6958d649150cfe5 Parents: 528bc80 Author: Anshul Gangwar Authored: Thu Dec 11 11:12:18 2014 +0530 Committer: Anshul Gangwar Committed: Fri Dec 12 11:24:28 2014 +0530 ---------------------------------------------------------------------- server/src/com/cloud/consoleproxy/AgentHookBase.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1115bc9c/server/src/com/cloud/consoleproxy/AgentHookBase.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/consoleproxy/AgentHookBase.java b/server/src/com/cloud/consoleproxy/AgentHookBase.java index 9864cae..8a5bae5 100644 --- a/server/src/com/cloud/consoleproxy/AgentHookBase.java +++ b/server/src/com/cloud/consoleproxy/AgentHookBase.java @@ -208,12 +208,13 @@ public abstract class AgentHookBase implements AgentHook { HostVO consoleProxyHost = findConsoleProxyHost(startupCmd); assert (consoleProxyHost != null); - - Answer answer = _agentMgr.send(consoleProxyHost.getId(), cmd); - if (answer == null || !answer.getResult()) { - s_logger.error("Console proxy agent reported that it failed to execute http handling startup command"); - } else { - s_logger.info("Successfully sent out command to start HTTP handling in console proxy agent"); + if (consoleProxyHost != null) { + Answer answer = _agentMgr.send(consoleProxyHost.getId(), cmd); + if (answer == null || !answer.getResult()) { + s_logger.error("Console proxy agent reported that it failed to execute http handling startup command"); + } else { + s_logger.info("Successfully sent out command to start HTTP handling in console proxy agent"); + } } }catch (NoSuchAlgorithmException e) { s_logger.error("Unexpected exception in SecureRandom Algorithm selection ", e);