cleanups, logging, javadoc

This commit is contained in:
zzz
2011-09-16 14:49:41 +00:00
parent a7f8560acf
commit dc04414e9a
4 changed files with 8 additions and 7 deletions

View File

@ -143,7 +143,7 @@ public class HandleFloodfillDatabaseStoreMessageJob extends JobImpl {
if ((!getContext().shitlist().isShitlistedForever(key)) &&
getContext().blocklist().isBlocklisted(key) &&
_log.shouldLog(Log.WARN))
_log.warn("Blocklisting new peer " + key);
_log.warn("Blocklisting new peer " + key + ' ' + ri);
} else {
Set oldAddr = prevNetDb.getAddresses();
Set newAddr = ri.getAddresses();
@ -151,7 +151,7 @@ public class HandleFloodfillDatabaseStoreMessageJob extends JobImpl {
(!getContext().shitlist().isShitlistedForever(key)) &&
getContext().blocklist().isBlocklisted(key) &&
_log.shouldLog(Log.WARN))
_log.warn("New address received, Blocklisting old peer " + key);
_log.warn("New address received, Blocklisting old peer " + key + ' ' + ri);
}
}
getContext().profileManager().heardAbout(key);

View File

@ -295,7 +295,7 @@ public class CommSystemFacadeImpl extends CommSystemFacade {
String cport = _context.getProperty(PROP_I2NP_NTCP_PORT);
if (cport != null && cport.length() > 0) {
nport = cport;
} else if (Boolean.valueOf(_context.getProperty(PROP_I2NP_NTCP_AUTO_PORT, "true")).booleanValue()) {
} else if (_context.getBooleanPropertyDefaultTrue(PROP_I2NP_NTCP_AUTO_PORT)) {
nport = UDPProps.getProperty(UDPAddress.PROP_PORT);
}
if (_log.shouldLog(Log.INFO))

View File

@ -977,12 +977,14 @@ class NTCPConnection implements FIFOBandwidthLimiter.CompleteListener {
}
/**
* the contents of the buffer include some fraction of one or more
* Connection must be established!
*
* The contents of the buffer include some fraction of one or more
* encrypted and encoded I2NP messages. individual i2np messages are
* encoded as "sizeof(data)+data+pad+crc", and those are encrypted
* with the session key and the last 16 bytes of the previous encrypted
* i2np message. the contents of the buffer is owned by the EventPumper,
* so data should be copied out
* so data should be copied out.
*/
synchronized void recvEncryptedI2NP(ByteBuffer buf) {
//if (_log.shouldLog(Log.DEBUG))

View File

@ -1405,8 +1405,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
/** default true */
private boolean allowDirectUDP() {
String allowDirect = _context.getProperty(PROP_ALLOW_DIRECT);
return ( (allowDirect == null) || (Boolean.valueOf(allowDirect).booleanValue()) );
return _context.getBooleanPropertyDefaultTrue(PROP_ALLOW_DIRECT);
}
String getPacketHandlerStatus() {