Router: Misc. javadocs and debug

This commit is contained in:
zzz
2018-06-26 18:45:11 +00:00
parent 3c53dfe628
commit 96c565d486
7 changed files with 10 additions and 14 deletions

View File

@ -72,7 +72,6 @@ class SymmetricState implements Destroyable {
* Constructs a new symmetric state object.
* Noise protocol name is hardcoded.
*
* @param protocolName The name of the Noise protocol, which is assumed to be valid.
* @param cipherName The name of the cipher within protocolName.
* @param hashName The name of the hash within protocolName.
*

View File

@ -157,11 +157,9 @@ public class RouterInfo extends DatabaseEntry {
}
/**
* Retrieve the approximate date on which the info was published
* (essentially a version number for the routerInfo structure, except that
* it also contains freshness information - whether or not the router is
* currently publishing its information). This should be used to help expire
* old routerInfo structures
* Retrieve the timestamp on which the info was published,
* essentially a version number for the RouterInfo.
* This should be used to expire old RouterInfo structures.
*
*/
public long getPublished() {

View File

@ -371,12 +371,12 @@ public class OutNetMessage implements CDPQEntry {
buf.append(getMessageType());
buf.append(" ID ").append(_messageId);
}
buf.append(" expiring on ").append(new Date(_expiration));
buf.append(" expiring ").append(new Date(_expiration));
buf.append(" priority ").append(_priority);
if (_failedTransports != null)
buf.append(" failed delivery on transports ").append(_failedTransports);
buf.append(" failed transports: ").append(_failedTransports);
if (_target == null)
buf.append(" targetting no one in particular...");
buf.append(" (null target)");
else
buf.append(" targetting ").append(_target.getIdentity().getHash().toBase64());
if (_onReply != null)

View File

@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */
public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 0;
public final static long BUILD = 1;
/** for example "-test" */
public final static String EXTRA = "";

View File

@ -572,8 +572,7 @@ public class DHSessionKeyBuilder {
*/
public void returnUnused(DHSessionKeyBuilder builder) {
if (builder.getPeerPublicValue() != null) {
if (_log.shouldLog(Log.WARN))
_log.warn("builder returned used");
_log.error("builder returned used", new Exception());
return;
}
_context.statManager().addRateData("crypto.DHReused", 1);

View File

@ -310,7 +310,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
int port = getRequestedPort();
if (port < 0) {
port = UDPEndpoint.selectRandomPort(_context);
Map<String, String> changes = new HashMap<String, String>();
Map<String, String> changes = new HashMap<String, String>(2);
changes.put(PROP_INTERNAL_PORT, Integer.toString(port));
changes.put(PROP_EXTERNAL_PORT, Integer.toString(port));
_context.router().saveConfig(changes, null);

View File

@ -305,7 +305,7 @@ public class TunnelPool {
/**
* Return a list of tunnels in the pool
*
* @return list of TunnelInfo objects
* @return A copy of the list of TunnelInfo objects
*/
public List<TunnelInfo> listTunnels() {
synchronized (_tunnels) {