Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2015-11-10 14:48:16 -0500
committerEugene Tarassov2015-11-10 14:48:16 -0500
commitfc13b4400c49f30302597fbcf9904b71291da5a1 (patch)
treee235b8e581247d2ebd241f305074dabdd7920d21 /plugins
parentb720c815df2f503692b1a485ad8069772d213634 (diff)
downloadorg.eclipse.tcf-fc13b4400c49f30302597fbcf9904b71291da5a1.tar.gz
org.eclipse.tcf-fc13b4400c49f30302597fbcf9904b71291da5a1.tar.xz
org.eclipse.tcf-fc13b4400c49f30302597fbcf9904b71291da5a1.zip
Bug 481787 - TCF Discovery fails to discover a local agent
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/local/LocatorService.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/local/LocatorService.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/local/LocatorService.java
index ed15da8fa..b5f9e57c8 100644
--- a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/local/LocatorService.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/local/LocatorService.java
@@ -639,12 +639,15 @@ public class LocatorService implements ILocator {
InetAddress address = ia.getAddress();
InetAddress broadcast = ia.getBroadcast();
- if (network_prefix_len == 0 && address instanceof Inet4Address) {
- // Java 1.6.0 on Linux returns network prefix == 0 for loop-back interface
- byte[] buf = address.getAddress();
- if (buf[0] == 127) {
- network_prefix_len = 8;
- if (broadcast == null) broadcast = address;
+ if (address instanceof Inet4Address) {
+ if (network_prefix_len == 0) {
+ // Java 1.6.0 on Linux returns network prefix == 0 for loop-back interface
+ byte[] buf = address.getAddress();
+ if (buf[0] == 127) network_prefix_len = 8;
+ }
+ if (broadcast == null) {
+ // Java 1.7.0 on Linux returns broadcast == null for loop-back interface
+ broadcast = address;
}
}

Back to the top