Log tweaks and minor cleanups, -15

This commit is contained in:
zzz
2013-10-29 21:03:20 +00:00
parent 0506a5915b
commit d2ee5b96ad
6 changed files with 24 additions and 10 deletions

View File

@@ -130,7 +130,7 @@ public class InNetMessagePool implements Service {
_log.info("Received inbound "
+ " with id " + messageBody.getUniqueId()
+ " expiring on " + exp
+ " of type " + messageBody.getClass().getName());
+ " of type " + messageBody.getClass().getSimpleName());
//if (messageBody instanceof DataMessage) {
// _context.statManager().getStatLog().addData(fromRouterHash.toBase64().substring(0,6), "udp.floodDataReceived", 1, 0);
@@ -185,7 +185,7 @@ public class InNetMessagePool implements Service {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Add message to the inNetMessage pool - builder: " + builder
+ " message class: " + messageBody.getClass().getName());
+ " message class: " + messageBody.getClass().getSimpleName());
if (builder != null) {
Job job = builder.createJob(messageBody, fromRouter,

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 = 14;
public final static long BUILD = 15;
/** for example "-test" */
public final static String EXTRA = "";

View File

@@ -250,7 +250,8 @@ public class TunnelPool {
TunnelInfo rv = null;
synchronized (_tunnels) {
if (!_tunnels.isEmpty()) {
Collections.sort(_tunnels, new TunnelInfoComparator(closestTo, avoidZeroHop));
if (_tunnels.size() > 1)
Collections.sort(_tunnels, new TunnelInfoComparator(closestTo, avoidZeroHop));
for (TunnelInfo info : _tunnels) {
if (info.getExpiration() > _context.clock().now()) {
rv = info;

View File

@@ -271,9 +271,6 @@ public class TunnelPoolManager implements TunnelManagerFacade {
/** @return number of inbound exploratory tunnels */
public int getFreeTunnelCount() {
if (_inboundExploratory == null)
return 0;
else
return _inboundExploratory.size();
}