Repository: cloudstack
Updated Branches:
  refs/heads/master 9c7f50aaa -> aa92f5d48


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/master
Commit: 1115bc9cc6ebf2b321bb5a3ff6958d649150cfe5
Parents: 528bc80
Author: Anshul Gangwar <[email protected]>
Authored: Thu Dec 11 11:12:18 2014 +0530
Committer: Anshul Gangwar <[email protected]>
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);

Reply via email to