Tunnels: static fix, synchronization fix, deprecate setPairedTunnel()

This commit is contained in:
zzz
2009-12-15 01:41:43 +00:00
parent a3d79aaa4e
commit e07e329c26
4 changed files with 6 additions and 4 deletions

View File

@ -109,7 +109,7 @@ class BuildRequestor {
return;
}
cfg.setPairedTunnel(pairedTunnel);
//cfg.setPairedTunnel(pairedTunnel);
long beforeDispatch = System.currentTimeMillis();
if (cfg.isInbound()) {

View File

@ -83,7 +83,9 @@ public class PooledTunnelCreatorConfig extends TunnelCreatorConfig {
public void setTestJob(TestJob job) { _testJob = job; }
public void setExpireJob(Job job) { /* _expireJob = job; */ }
// Fix memory leaks caused by references if you need to use pairedTunnel
/**
* @deprecated Fix memory leaks caused by references if you need to use pairedTunnel
*/
public void setPairedTunnel(TunnelInfo tunnel) { /* _pairedTunnel = tunnel; */}
// public TunnelInfo getPairedTunnel() { return _pairedTunnel; }
}

View File

@ -491,7 +491,7 @@ public abstract class TunnelPeerSelector {
* Now:
* d((H(l+h), h) - d(H(r+h), h)
*/
private class HashComparator implements Comparator {
private static class HashComparator implements Comparator {
private Hash _hash;
private HashComparator(Hash h) {

View File

@ -175,7 +175,7 @@ public class TunnelPoolManager implements TunnelManagerFacade {
public int getOutboundClientTunnelCount() {
int count = 0;
List destinations = null;
synchronized (_clientInboundPools) {
synchronized (_clientOutboundPools) {
destinations = new ArrayList(_clientOutboundPools.keySet());
}
for (int i = 0; i < destinations.size(); i++) {