cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject git commit: updated refs/heads/object_store to 1e21b0b
Date Thu, 23 May 2013 20:05:16 GMT
Updated Branches:
  refs/heads/object_store 8d08f9b74 -> 1e21b0b0e


Handle null host ip from NetUtils.getDefaultHostIp().

Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1e21b0b0
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1e21b0b0
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1e21b0b0

Branch: refs/heads/object_store
Commit: 1e21b0b0e8801b7fafd67ca4c9a9bb307567b9ef
Parents: 8d08f9b
Author: Min Chen <min.chen@citrix.com>
Authored: Thu May 23 13:05:01 2013 -0700
Committer: Min Chen <min.chen@citrix.com>
Committed: Thu May 23 13:05:01 2013 -0700

----------------------------------------------------------------------
 .../cloudstack/storage/LocalHostEndpoint.java      |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e21b0b0/engine/storage/src/org/apache/cloudstack/storage/LocalHostEndpoint.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/LocalHostEndpoint.java b/engine/storage/src/org/apache/cloudstack/storage/LocalHostEndpoint.java
index 1d21b06..c095791 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/LocalHostEndpoint.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/LocalHostEndpoint.java
@@ -57,7 +57,11 @@ public class LocalHostEndpoint implements EndPoint {
 
     @Override
     public String getPublicAddr() {
-        return NetUtils.getDefaultHostIp();
+        String hostIp= NetUtils.getDefaultHostIp();
+        if (hostIp != null)
+            return hostIp;
+        else
+            return "127.0.0.0";
     }
 
     @Override


Mime
View raw message