Changeset fe15db5


Ignore:
Timestamp:
Jun 2, 2011 6:29:06 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
ec6084c
Parents:
761ad38b
Message:
  • Logging tweaks inspired by Android
  • Disable reusing Deflater on Android
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • android/README.txt

    r761ad38b rfe15db5  
    3737#to rebuild and reinstall to emulator:
    3838ant reinstall
     39
     40# Now click on the I2P icon on your phone!
  • android/res/raw/router_config

    r761ad38b rfe15db5  
    77router.decayingBloomFilterM=20
    88stat.full=false
    9 i2np.udp.maxConnections=30
     9#
    1010# no I2CP
     11#
    1112i2p.dummyClientFacade=true
    12 # for now
     13#
     14##### Transport
     15#
     16#
     17# NTCP
     18#
    1319#i2np.ntcp.enable=false
     20i2np.ntcp.maxConnections=8
    1421#
    1522# UDP crashes the JVM, don't know why
    1623#
    1724i2np.udp.enable=false
     25i2np.udp.maxConnections=12
     26#
    1827# no COMM at all!!!
    1928#i2p.vmCommSystem=true
     29#
    2030# not on android
    2131i2np.upnp.enable=false
  • core/java/src/net/i2p/crypto/SHA256Generator.java

    r761ad38b rfe15db5  
    3333    }
    3434
     35    /**
     36     *  @param context unused
     37     */
    3538    public SHA256Generator(I2PAppContext context) {
    3639        _digests = new LinkedBlockingQueue(32);
  • core/java/src/net/i2p/util/ReusableGZIPOutputStream.java

    r761ad38b rfe15db5  
    1616public class ReusableGZIPOutputStream extends ResettableGZIPOutputStream {
    1717    // Apache Harmony 5.0M13 Deflater doesn't work after reset()
    18     private static final boolean ENABLE_CACHING = !System.getProperty("java.vendor").startsWith("Apache");
     18    // Neither does Android
     19    private static final boolean ENABLE_CACHING = !(System.getProperty("java.vendor").startsWith("Apache") ||
     20                                                    System.getProperty("java.vendor").contains("Android"));
    1921    private static final LinkedBlockingQueue<ReusableGZIPOutputStream> _available;
    2022    static {
  • history.txt

    r761ad38b rfe15db5  
     12011-06-02 zzz
     2    * Android: Build fixes
     3    * Crypto:
     4      - HMAC Javadocs and cleanups
     5      - HMAC Use SimpleByteCache
     6    * ElGamalAESEngine: Fixups required after SessionKey enforcement
     7    * Reseed: Give up on a seed after 90% of fetches fail
     8    * SessionKey: Enforce data size and prevent reuse
     9
    1102011-06-01 zzz
    211    * Crypto:
  • router/java/src/net/i2p/data/i2np/DatabaseStoreMessage.java

    r761ad38b rfe15db5  
    151151        if (_replyToken > 0)
    152152            len += 4 + Hash.HASH_LENGTH; // replyTunnel+replyGateway
    153         if (_dbEntry.getType() == DatabaseEntry.KEY_TYPE_LEASESET) {
     153        int type = _dbEntry.getType();
     154        if (type == DatabaseEntry.KEY_TYPE_LEASESET) {
    154155            _byteCache = _dbEntry.toByteArray();
    155         } else if (_dbEntry.getType() == DatabaseEntry.KEY_TYPE_ROUTERINFO) {
     156        } else if (type == DatabaseEntry.KEY_TYPE_ROUTERINFO) {
    156157            byte uncompressed[] = _dbEntry.toByteArray();
    157158            _byteCache = DataHelper.compress(uncompressed);
    158159            len += 2;
     160        } else {
     161            throw new IllegalStateException("Invalid key type " + type);
    159162        }
    160163        len += _byteCache.length;
     
    167170        int type = _dbEntry.getType();
    168171        if (type != DatabaseEntry.KEY_TYPE_LEASESET && type != DatabaseEntry.KEY_TYPE_ROUTERINFO)
    169             throw new I2NPMessageException("Invalid key type");
     172            throw new I2NPMessageException("Invalid key type " + type);
    170173       
    171174        // Use the hash of the DatabaseEntry
  • router/java/src/net/i2p/router/Router.java

    r761ad38b rfe15db5  
    312312   
    313313    public RouterInfo getRouterInfo() { return _routerInfo; }
     314
    314315    public void setRouterInfo(RouterInfo info) {
    315316        _routerInfo = info;
     317        if (_log.shouldLog(Log.INFO))
     318            _log.info("setRouterInfo() : " + info, new Exception("I did it"));
    316319        if (info != null)
    317320            _context.jobQueue().addJob(new PersistRouterInfoJob(_context));
     
    615618        }
    616619        // hard and ugly
     620        if (System.getProperty("wrapper.version") != null)
     621            _log.log(Log.CRIT, "Restarting with new router identity");
     622        else
     623            _log.log(Log.CRIT, "Shutting down because old router identity was invalid - restart I2P");
    617624        finalShutdown(EXIT_HARD_RESTART);
    618625    }
  • router/java/src/net/i2p/router/RouterVersion.java

    r761ad38b rfe15db5  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 15;
     21    public final static long BUILD = 16;
    2222
    2323    /** for example "-test" */
  • router/java/src/net/i2p/router/networkdb/PublishLocalRouterInfoJob.java

    r761ad38b rfe15db5  
    6666                getContext().netDb().publish(ri);
    6767            } catch (IllegalArgumentException iae) {
    68                 _log.log(Log.CRIT, "Error publishing our identity - corrupt?", iae);
     68                _log.log(Log.CRIT, "Error publishing our identity - corrupt? Restart required", iae);
    6969                getContext().router().rebuildNewIdentity();
    7070            }
Note: See TracChangeset for help on using the changeset viewer.