Changeset 69cae1a


Ignore:
Timestamp:
Dec 4, 2011 6:53:24 PM (8 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
e9d0d79
Parents:
cc71e3a
Message:

cleanup

Location:
router/java/src/net/i2p/router
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/RouterDoSThrottle.java

    rcc71e3a r69cae1a  
    2828       
    2929        // now lets check for DoS
    30         long now = getContext().clock().now();
     30        long now = _context.clock().now();
    3131        if (_currentLookupPeriod + LOOKUP_THROTTLE_PERIOD > now) {
    3232            // same period, check for DoS
    3333            _currentLookupCount++;
    3434            if (_currentLookupCount >= LOOKUP_THROTTLE_MAX) {
    35                 getContext().statManager().addRateData("router.throttleNetDbDoS", _currentLookupCount, 0);
    36                 int rand = getContext().random().nextInt(_currentLookupCount);
     35                _context.statManager().addRateData("router.throttleNetDbDoS", _currentLookupCount, 0);
     36                int rand = _context.random().nextInt(_currentLookupCount);
    3737                if (rand > LOOKUP_THROTTLE_MAX) {
    3838                    return false;
  • router/java/src/net/i2p/router/RouterThrottleImpl.java

    rcc71e3a r69cae1a  
    1515 */
    1616class RouterThrottleImpl implements RouterThrottle {
    17     private final RouterContext _context;
     17    protected final RouterContext _context;
    1818    private final Log _log;
    1919    private String _tunnelStatus;
     
    539539    }
    540540
    541     protected RouterContext getContext() { return _context; }
    542 
    543541    /**
    544542     *  Mark a string for extraction by xgettext and translation.
Note: See TracChangeset for help on using the changeset viewer.