forked from I2P_Developers/i2p.i2p
* GarlicMessage: Fix notes and log in GarlicMessageHandler and HandleGarlicMessageJob,
they are used for netdb messages received by floodfills http://zzz.i2p/topics/1282
This commit is contained in:
@@ -19,9 +19,11 @@ import net.i2p.router.RouterContext;
|
||||
/**
|
||||
* HandlerJobBuilder to build jobs to handle GarlicMessages
|
||||
*
|
||||
* This is essentially unused, as InNetMessagePool short circuits tunnel messages,
|
||||
* and the garlics are handled in InboundMessageDistributor.
|
||||
* Unless we get a garlic message not down a tunnel?
|
||||
* This is the handler for garlic message not received down a tunnel, which is the
|
||||
* case for floodfills receiving netdb messages.
|
||||
* It is not the handler for garlic messages received down a tunnel,
|
||||
* as InNetMessagePool short circuits tunnel messages,
|
||||
* and those garlic messages are handled in InboundMessageDistributor.
|
||||
*/
|
||||
public class GarlicMessageHandler implements HandlerJobBuilder {
|
||||
private final RouterContext _context;
|
||||
|
@@ -25,9 +25,11 @@ import net.i2p.util.Log;
|
||||
* as if they arrived locally. Other instructions are not yet implemented (but
|
||||
* need to be. soon)
|
||||
*
|
||||
* This is essentially unused, as InNetMessagePool short circuits tunnel messages,
|
||||
* and the garlics are handled in InboundMessageDistributor.
|
||||
* Unless we get a garlic message not down a tunnel?
|
||||
* This is the handler for garlic message not received down a tunnel, which is the
|
||||
* case for floodfills receiving netdb messages.
|
||||
* It is not the handler for garlic messages received down a tunnel,
|
||||
* as InNetMessagePool short circuits tunnel messages,
|
||||
* and those garlic messages are handled in InboundMessageDistributor.
|
||||
*/
|
||||
class HandleGarlicMessageJob extends JobImpl implements GarlicMessageReceiver.CloveReceiver {
|
||||
private final Log _log;
|
||||
@@ -49,8 +51,8 @@ class HandleGarlicMessageJob extends JobImpl implements GarlicMessageReceiver.Cl
|
||||
super(context);
|
||||
_log = context.logManager().getLog(HandleGarlicMessageJob.class);
|
||||
getContext().statManager().createRateStat("crypto.garlic.decryptFail", "How often garlic messages are undecryptable", "Encryption", new long[] { 5*60*1000, 60*60*1000, 24*60*60*1000 });
|
||||
if (_log.shouldLog(Log.WARN))
|
||||
_log.warn("Garlic Message not down a tunnel??? from [" + from + "]", new Exception("I did it"));
|
||||
if (_log.shouldLog(Log.DEBUG))
|
||||
_log.debug("Garlic Message not down a tunnel from [" + from + "]");
|
||||
_message = msg;
|
||||
//_from = from;
|
||||
//_fromHash = fromHash;
|
||||
|
Reference in New Issue
Block a user