geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jensde...@apache.org
Subject [18/50] [abbrv] incubator-geode git commit: GEODE-944: also check loopback address. This fixes the unit test failure on ubuntu.
Date Thu, 25 Feb 2016 20:27:06 GMT
GEODE-944: also check loopback address. This fixes the unit test
failure on ubuntu.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/d8522c23
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/d8522c23
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/d8522c23

Branch: refs/heads/feature/GEODE-17
Commit: d8522c23a87077699e5192041d7427192cb40c63
Parents: c32e1b4
Author: Jianxia Chen <jchen@pivotal.io>
Authored: Wed Feb 24 09:28:23 2016 -0800
Committer: Jianxia Chen <jchen@pivotal.io>
Committed: Wed Feb 24 09:28:23 2016 -0800

----------------------------------------------------------------------
 .../java/com/gemstone/gemfire/distributed/LocatorLauncher.java  | 5 +++--
 .../java/com/gemstone/gemfire/distributed/ServerLauncher.java   | 5 +++--
 .../main/java/com/gemstone/gemfire/internal/SocketCreator.java  | 3 +++
 3 files changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d8522c23/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java
b/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java
index b0be89f..cfbad53 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java
@@ -1480,8 +1480,9 @@ public final class LocatorLauncher extends AbstractLauncher<String>
{
       }
       else {
         try {
-          this.bindAddress = InetAddress.getByName(bindAddress);
-          if (SocketCreator.isLocalHost(this.bindAddress)) {
+          InetAddress address = InetAddress.getByName(bindAddress);
+          if (SocketCreator.isLocalHost(address)) {
+            this.bindAddress = address;
             return this;
           }
           else {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d8522c23/geode-core/src/main/java/com/gemstone/gemfire/distributed/ServerLauncher.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/ServerLauncher.java
b/geode-core/src/main/java/com/gemstone/gemfire/distributed/ServerLauncher.java
index f13bb73..4f43370 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/ServerLauncher.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/ServerLauncher.java
@@ -1958,8 +1958,9 @@ public final class ServerLauncher extends AbstractLauncher<String>
{
       // NOTE only set the 'bind address' if the user specified a value
       else {
         try {
-          this.serverBindAddress = InetAddress.getByName(serverBindAddress);
-          if (SocketCreator.isLocalHost(this.serverBindAddress)) {
+          InetAddress bindAddress = InetAddress.getByName(serverBindAddress);
+          if (SocketCreator.isLocalHost(bindAddress)) {
+            this.serverBindAddress = bindAddress;
             this.serverBindAddressSetByUser = true;
             return this;
           }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d8522c23/geode-core/src/main/java/com/gemstone/gemfire/internal/SocketCreator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/SocketCreator.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/SocketCreator.java
index 9a74abd..5bfa7bd 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/SocketCreator.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/SocketCreator.java
@@ -1311,6 +1311,9 @@ public class SocketCreator {
       if (InetAddressUtil.LOCALHOST.equals(host)) {
         return true;
       }
+      else if (((InetAddress) host).isLoopbackAddress()) {
+        return true;
+      }
       else {
         try {
           Enumeration en=NetworkInterface.getNetworkInterfaces();


Mime
View raw message