forked from I2P_Developers/i2p.i2p
cleanups, logging, javadoc
This commit is contained in:
@ -143,7 +143,7 @@ public class HandleFloodfillDatabaseStoreMessageJob extends JobImpl {
|
|||||||
if ((!getContext().shitlist().isShitlistedForever(key)) &&
|
if ((!getContext().shitlist().isShitlistedForever(key)) &&
|
||||||
getContext().blocklist().isBlocklisted(key) &&
|
getContext().blocklist().isBlocklisted(key) &&
|
||||||
_log.shouldLog(Log.WARN))
|
_log.shouldLog(Log.WARN))
|
||||||
_log.warn("Blocklisting new peer " + key);
|
_log.warn("Blocklisting new peer " + key + ' ' + ri);
|
||||||
} else {
|
} else {
|
||||||
Set oldAddr = prevNetDb.getAddresses();
|
Set oldAddr = prevNetDb.getAddresses();
|
||||||
Set newAddr = ri.getAddresses();
|
Set newAddr = ri.getAddresses();
|
||||||
@ -151,7 +151,7 @@ public class HandleFloodfillDatabaseStoreMessageJob extends JobImpl {
|
|||||||
(!getContext().shitlist().isShitlistedForever(key)) &&
|
(!getContext().shitlist().isShitlistedForever(key)) &&
|
||||||
getContext().blocklist().isBlocklisted(key) &&
|
getContext().blocklist().isBlocklisted(key) &&
|
||||||
_log.shouldLog(Log.WARN))
|
_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);
|
getContext().profileManager().heardAbout(key);
|
||||||
|
@ -295,7 +295,7 @@ public class CommSystemFacadeImpl extends CommSystemFacade {
|
|||||||
String cport = _context.getProperty(PROP_I2NP_NTCP_PORT);
|
String cport = _context.getProperty(PROP_I2NP_NTCP_PORT);
|
||||||
if (cport != null && cport.length() > 0) {
|
if (cport != null && cport.length() > 0) {
|
||||||
nport = cport;
|
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);
|
nport = UDPProps.getProperty(UDPAddress.PROP_PORT);
|
||||||
}
|
}
|
||||||
if (_log.shouldLog(Log.INFO))
|
if (_log.shouldLog(Log.INFO))
|
||||||
|
@ -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
|
* encrypted and encoded I2NP messages. individual i2np messages are
|
||||||
* encoded as "sizeof(data)+data+pad+crc", and those are encrypted
|
* encoded as "sizeof(data)+data+pad+crc", and those are encrypted
|
||||||
* with the session key and the last 16 bytes of the previous 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,
|
* 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) {
|
synchronized void recvEncryptedI2NP(ByteBuffer buf) {
|
||||||
//if (_log.shouldLog(Log.DEBUG))
|
//if (_log.shouldLog(Log.DEBUG))
|
||||||
|
@ -1405,8 +1405,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
|||||||
|
|
||||||
/** default true */
|
/** default true */
|
||||||
private boolean allowDirectUDP() {
|
private boolean allowDirectUDP() {
|
||||||
String allowDirect = _context.getProperty(PROP_ALLOW_DIRECT);
|
return _context.getBooleanPropertyDefaultTrue(PROP_ALLOW_DIRECT);
|
||||||
return ( (allowDirect == null) || (Boolean.valueOf(allowDirect).booleanValue()) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String getPacketHandlerStatus() {
|
String getPacketHandlerStatus() {
|
||||||
|
Reference in New Issue
Block a user