mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Rename endpoints field.
This commit is contained in:
@@ -181,10 +181,10 @@ class RendezvousPollerImpl implements RendezvousPoller, Service, EventListener {
|
|||||||
createEndpoint(ps.plugin, p.getId(), cs);
|
createEndpoint(ps.plugin, p.getId(), cs);
|
||||||
if (endpoint != null) {
|
if (endpoint != null) {
|
||||||
requireNull(ps.endpoints.put(p.getId(), endpoint));
|
requireNull(ps.endpoints.put(p.getId(), endpoint));
|
||||||
cs.endpoints++;
|
cs.numEndpoints++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (cs.endpoints == 0) broadcastState(p.getId(), OFFLINE);
|
if (cs.numEndpoints == 0) broadcastState(p.getId(), OFFLINE);
|
||||||
else broadcastState(p.getId(), WAITING_FOR_CONNECTION);
|
else broadcastState(p.getId(), WAITING_FOR_CONNECTION);
|
||||||
} catch (DbException | GeneralSecurityException e) {
|
} catch (DbException | GeneralSecurityException e) {
|
||||||
logException(LOG, WARNING, e);
|
logException(LOG, WARNING, e);
|
||||||
@@ -336,7 +336,7 @@ class RendezvousPollerImpl implements RendezvousPoller, Service, EventListener {
|
|||||||
RendezvousEndpoint endpoint = createEndpoint(plugin, p, cs);
|
RendezvousEndpoint endpoint = createEndpoint(plugin, p, cs);
|
||||||
if (endpoint != null) {
|
if (endpoint != null) {
|
||||||
endpoints.put(p, endpoint);
|
endpoints.put(p, endpoint);
|
||||||
if (++cs.endpoints == 1)
|
if (++cs.numEndpoints == 1)
|
||||||
broadcastState(p, WAITING_FOR_CONNECTION);
|
broadcastState(p, WAITING_FOR_CONNECTION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -356,7 +356,7 @@ class RendezvousPollerImpl implements RendezvousPoller, Service, EventListener {
|
|||||||
ps.endpoints.entrySet()) {
|
ps.endpoints.entrySet()) {
|
||||||
tryToClose(e.getValue(), LOG, INFO);
|
tryToClose(e.getValue(), LOG, INFO);
|
||||||
CryptoState cs = cryptoStates.get(e.getKey());
|
CryptoState cs = cryptoStates.get(e.getKey());
|
||||||
if (--cs.endpoints == 0) broadcastState(e.getKey(), OFFLINE);
|
if (--cs.numEndpoints == 0) broadcastState(e.getKey(), OFFLINE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -402,7 +402,7 @@ class RendezvousPollerImpl implements RendezvousPoller, Service, EventListener {
|
|||||||
private final boolean alice;
|
private final boolean alice;
|
||||||
private final long expiry;
|
private final long expiry;
|
||||||
|
|
||||||
private int endpoints = 0;
|
private int numEndpoints = 0;
|
||||||
|
|
||||||
private CryptoState(SecretKey rendezvousKey, boolean alice,
|
private CryptoState(SecretKey rendezvousKey, boolean alice,
|
||||||
long expiry) {
|
long expiry) {
|
||||||
|
|||||||
Reference in New Issue
Block a user