Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2013-08-13 14:50:37 +0000
committerUwe Stieber2013-08-13 14:50:37 +0000
commit707190b2fca91b375903afacfd1fc6e2f82656d8 (patch)
treeaca6e2f1df17af5a7bb6f1a1017d9d0f501b8f16 /target_explorer
parentb8550e331a5a35fc6635cf0e66f9f18a1fad7ec0 (diff)
downloadorg.eclipse.tcf-707190b2fca91b375903afacfd1fc6e2f82656d8.tar.gz
org.eclipse.tcf-707190b2fca91b375903afacfd1fc6e2f82656d8.tar.xz
org.eclipse.tcf-707190b2fca91b375903afacfd1fc6e2f82656d8.zip
Target Explorer: Improve scanner logic to avoid calling Locator.getPeers if the remote peer is the local host
Diffstat (limited to 'target_explorer')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/ScannerRunnable.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/ScannerRunnable.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/ScannerRunnable.java
index 0f3aa767b..aa289897f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/ScannerRunnable.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/ScannerRunnable.java
@@ -296,11 +296,14 @@ public class ScannerRunnable implements Runnable, IChannel.IChannelListener {
peerNode.setProperty(IPeerModelProperties.PROP_INSTANCE, new Peer(attrs));
}
+ String remoteIP = channel.getRemotePeer().getAttributes().get(IPeer.ATTR_IP_HOST);
+ boolean isLocal = remoteIP != null && IPAddressUtil.getInstance().isLocalHost(remoteIP);
+
boolean isCLI = channel.getRemotePeer().getName() != null
&& (channel.getRemotePeer().getName().startsWith("Eclipse CLI") //$NON-NLS-1$
|| channel.getRemotePeer().getName().endsWith("CLI Server") //$NON-NLS-1$
|| channel.getRemotePeer().getName().endsWith("CLI Client")); //$NON-NLS-1$
- if (isCLI) {
+ if (isLocal || isCLI) {
onDone(peerNode, changed);
} else {
// Get the peers from the remote locator

Back to the top