Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Schneider2015-03-18 09:04:53 +0000
committerChristian Schneider2015-04-01 09:59:12 +0000
commitf130a7a596c2bc3c95c2068649da575ff14c93d8 (patch)
tree19df9745a20c2b7f266d2816137ce69f980a2445
parent3b83c56d53a46c107b4cf2e263ddb705866620bf (diff)
downloadrt.equinox.p2-f130a7a596c2bc3c95c2068649da575ff14c93d8.tar.gz
rt.equinox.p2-f130a7a596c2bc3c95c2068649da575ff14c93d8.tar.xz
rt.equinox.p2-f130a7a596c2bc3c95c2068649da575ff14c93d8.zip
Bug 409709 - use loopback device when opening a port for uniqueness to
avoid Windows Firewall Popup; use 127.0.0.1 for Java 1.5 compatibility Change-Id: I07b5fc89b1f7a7bb49d2f1c2e8f2b8382a55653d Signed-off-by: Christian Schneider <schneider@yatta.de>
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/BackupStore.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/BackupStore.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/BackupStore.java
index 0d3204027..6f1e7c142 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/BackupStore.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/BackupStore.java
@@ -744,7 +744,9 @@ public class BackupStore implements IBackupStore {
}
int port = 0;
try {
- socket = new ServerSocket(0);
+ // TODO: this should be replaced by InetAddress.getLoopbackAddress() when 1.7 compatibility is OK
+ // on a system where solely IPv6 is available this address resolution will fail:
+ socket = new ServerSocket(0, 1, InetAddress.getByName("127.0.0.1")); //$NON-NLS-1$
port = socket.getLocalPort();
} catch (IOException e) {
try {

Back to the top