Changeset 0070abc


Ignore:
Timestamp:
Jun 4, 2009 4:28:32 PM (11 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
a9a2d2d
Parents:
7725b9e (diff), 936a338 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

propagate from branch 'i2p.i2p.zzz.test' (head be1a2452acf68a8a0137f98f5aeb797055321d6e)

to branch 'i2p.i2p' (head bd6b02d1ae8a99afcea7fdffedf699a6e5c85fbf)

Files:
16 edited
2 moved

Legend:

Unmodified
Added
Removed
  • INSTALL-headless.txt

    r7725b9e r0070abc  
    1 $Id: install-headless.txt,v 1.5 2005/09/29 14:19:23 jrandom Exp $
    21Headless I2P installation instructions
    32
    431) tar xjf i2p.tar.bz2                     (you've already done this)
    5 2) cd i2p ; vi install-headless.txt        (you're doing this now)
     42) cd i2p ; vi INSTALL-headless.txt        (you're doing this now)
    653) sh postinstall.sh                       (this launches the router)
    764) lynx http://localhost:7657/index.jsp    (configure the router)
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnel.java

    r7725b9e r0070abc  
    7676    private long _tunnelId;
    7777    private Properties _clientOptions;
    78     private final List _sessions;
     78    private final List<I2PSession> _sessions;
    7979
    8080    public static final int PACKET_DELAY = 100;
     
    180180    }
    181181
    182     List getSessions() {
     182    List<I2PSession> getSessions() {
    183183        synchronized (_sessions) {
    184184            return new ArrayList(_sessions);
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelClientBase.java

    r7725b9e r0070abc  
    4545    protected I2PSocketManager sockMgr; // should be final and use a factory. LINT
    4646    protected List mySockets = new ArrayList();
     47    protected boolean _ownDest;
    4748
    4849    protected Destination dest = null;
     
    115116        this.handlerName = handlerName + _clientId;
    116117        this.privKeyFile = pkf;
     118        _ownDest = ownDest; // == ! shared client
    117119
    118120
     
    130132        if (openNow) {
    131133            while (sockMgr == null) {
    132                 synchronized (sockLock) {
    133                     if (ownDest) {
    134                         sockMgr = buildSocketManager();
    135                     } else {
    136                         sockMgr = getSocketManager();
    137                     }
    138                 }
     134                verifySocketManager();
    139135                if (sockMgr == null) {
    140136                    _log.log(Log.CRIT, "Unable to create socket manager (our own? " + ownDest + ")");
     
    210206    }
    211207
     208    /**
     209     * Sets the this.sockMgr field if it is null, or if we want a new one
     210     *
     211     * We need a socket manager before getDefaultOptions() and most other things
     212     */
     213    protected void verifySocketManager() {
     214        synchronized(sockLock) {
     215            boolean newManager = false;
     216            if (this.sockMgr == null) {
     217                newManager = true;
     218            } else {
     219                I2PSession sess = sockMgr.getSession();
     220                if (sess == null) {
     221                    newManager = true;
     222                } else if (sess.isClosed() &&
     223                           Boolean.valueOf(getTunnel().getClientOptions().getProperty("i2cp.closeOnIdle")).booleanValue() &&
     224                           Boolean.valueOf(getTunnel().getClientOptions().getProperty("i2cp.newDestOnResume")).booleanValue()) {
     225                    // build a new socket manager and a new dest if the session is closed.
     226                    getTunnel().removeSession(sess);
     227                    if (_log.shouldLog(Log.WARN))
     228                        _log.warn(getTunnel().getClientOptions().getProperty("inbound.nickname") + ": Built a new destination on resume");
     229                    newManager = true;
     230                }  // else the old socket manager will reconnect the old session if necessary
     231            }
     232            if (newManager) {
     233                if (_ownDest)
     234                    this.sockMgr = buildSocketManager();
     235                else
     236                    this.sockMgr = getSocketManager();
     237            }
     238        }
     239    }
     240
     241    /** this is ONLY for shared clients */
    212242    private static I2PSocketManager socketManager;
    213243
     244    /** this is ONLY for shared clients */
    214245    protected synchronized I2PSocketManager getSocketManager() {
    215246        return getSocketManager(getTunnel(), this.privKeyFile);
    216247    }
     248    /** this is ONLY for shared clients */
    217249    protected static synchronized I2PSocketManager getSocketManager(I2PTunnel tunnel) {
    218250        return getSocketManager(tunnel, null);
    219251    }
     252    /** this is ONLY for shared clients */
    220253    protected static synchronized I2PSocketManager getSocketManager(I2PTunnel tunnel, String pkf) {
    221254        if (socketManager != null) {
    222255            I2PSession s = socketManager.getSession();
    223256            if ( (s == null) || (s.isClosed()) ) {
    224                 _log.info("Building a new socket manager since the old one closed [s=" + s + "]");
     257                if (_log.shouldLog(Log.INFO))
     258                    _log.info(tunnel.getClientOptions().getProperty("inbound.nickname") + ": Building a new socket manager since the old one closed [s=" + s + "]");
    225259                if (s != null)
    226260                    tunnel.removeSession(s);
    227261                socketManager = buildSocketManager(tunnel, pkf);
    228262            } else {
    229                 _log.info("Not building a new socket manager since the old one is open [s=" + s + "]");
     263                if (_log.shouldLog(Log.INFO))
     264                    _log.info(tunnel.getClientOptions().getProperty("inbound.nickname") + ": Not building a new socket manager since the old one is open [s=" + s + "]");
    230265            }
    231266        } else {
    232             _log.info("Building a new socket manager since there is no other one");
     267            if (_log.shouldLog(Log.INFO))
     268                _log.info(tunnel.getClientOptions().getProperty("inbound.nickname") + ": Building a new socket manager since there is no other one");
    233269            socketManager = buildSocketManager(tunnel, pkf);
    234270        }
     
    279315        }
    280316        sockManager.setName("Client");
     317        if (_log.shouldLog(Log.INFO))
     318            _log.info(tunnel.getClientOptions().getProperty("inbound.nickname") + ": Built a new socket manager [s=" + sockManager.getSession() + "]");
    281319        tunnel.addSession(sockManager.getSession());
    282320        return sockManager;
     
    344382     */
    345383    public I2PSocket createI2PSocket(Destination dest) throws I2PException, ConnectException, NoRouteToHostException, InterruptedIOException {
    346         if (sockMgr == null) {
    347             // we need this before getDefaultOptions()
    348             synchronized(sockLock) {
    349                 sockMgr = getSocketManager();
    350             }
    351         }
     384        verifySocketManager();
    352385        return createI2PSocket(dest, getDefaultOptions());
    353386    }
     
    370403        I2PSocket i2ps;
    371404
    372         if (sockMgr == null) {
    373             // delayed open - call get instead of build because the locking is up there
    374             synchronized(sockLock) {
    375                 sockMgr = getSocketManager();
    376             }
    377         } else if (Boolean.valueOf(getTunnel().getClientOptions().getProperty("i2cp.closeOnIdle")).booleanValue() &&
    378                    Boolean.valueOf(getTunnel().getClientOptions().getProperty("i2cp.newDestOnResume")).booleanValue()) {
    379             synchronized(sockLock) {
    380                 I2PSocketManager oldSockMgr = sockMgr;
    381                 // This will build a new socket manager and a new dest if the session is closed.
    382                 sockMgr = getSocketManager();
    383                 if (oldSockMgr != sockMgr) {
    384                     _log.warn("Built a new destination on resume");
    385                 }
    386             }
    387         }  // else the old socket manager will reconnect the old session if necessary
     405        verifySocketManager();
    388406        i2ps = sockMgr.connect(dest, opt);
    389407        synchronized (sockLock) {
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelConnectClient.java

    r7725b9e r0070abc  
    158158            defaultOpts.setProperty("i2p.streaming.inactivityTimeout", ""+DEFAULT_READ_TIMEOUT);
    159159        // delayed start
    160         if (sockMgr == null) {
    161             synchronized(sockLock) {
    162                 sockMgr = getSocketManager();
    163             }
    164         }
     160        verifySocketManager();
    165161        I2PSocketOptions opts = sockMgr.buildOptions(defaultOpts);
    166162        if (!defaultOpts.containsKey(I2PSocketOptions.PROP_CONNECT_TIMEOUT))
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java

    r7725b9e r0070abc  
    212212            defaultOpts.setProperty("i2p.streaming.inactivityTimeout", ""+DEFAULT_READ_TIMEOUT);
    213213        // delayed start
    214         if (sockMgr == null) {
    215             synchronized(sockLock) {
    216                 sockMgr = getSocketManager();
    217             }
    218         }
     214        verifySocketManager();
    219215        I2PSocketOptions opts = sockMgr.buildOptions(defaultOpts);
    220216        if (!defaultOpts.containsKey(I2PSocketOptions.PROP_CONNECT_TIMEOUT))
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/TunnelController.java

    r7725b9e r0070abc  
    435435    public boolean getIsRunning() { return _running; }
    436436    public boolean getIsStarting() { return _starting; }
     437    /** if running but no open sessions, we are in standby */
     438    public boolean getIsStandby() {
     439        if (!_running)
     440            return false;
     441        for (I2PSession sess : _tunnel.getSessions()) {
     442            if (!sess.isClosed())
     443                return false;
     444        }
     445        return true;
     446    }
    437447   
    438448    public void getSummary(StringBuffer buf) {
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/IndexBean.java

    r7725b9e r0070abc  
    7878    public static final int STARTING = 2;
    7979    public static final int NOT_RUNNING = 3;
     80    public static final int STANDBY = 4;
    8081   
    8182    public static final String PROP_TUNNEL_PASSPHRASE = "i2ptunnel.passphrase";
     
    413414        TunnelController tun = getController(tunnel);
    414415        if (tun == null) return NOT_RUNNING;
    415         if (tun.getIsRunning()) return RUNNING;
    416         else if (tun.getIsStarting()) return STARTING;
     416        if (tun.getIsRunning()) {
     417            if (isClient(tunnel) && tun.getIsStandby())
     418                return STANDBY;
     419            else
     420                return RUNNING;
     421        } else if (tun.getIsStarting()) return STARTING;
    417422        else return NOT_RUNNING;
    418423    }
     
    779784            else
    780785                config.setProperty("interface", _reachableBy);
    781             config.setProperty("option.inbound.nickname", CLIENT_NICKNAME);
    782             config.setProperty("option.outbound.nickname", CLIENT_NICKNAME);
    783             if (_name != null && !_sharedClient) {
    784                  config.setProperty("option.inbound.nickname", _name);
    785                  config.setProperty("option.outbound.nickname", _name);
    786             }
    787786            config.setProperty("sharedClient", _sharedClient + "");
    788787            for (String p : _booleanClientOpts)
     
    897896        else
    898897            config.setProperty("option.i2p.streaming.connectDelay", "0");
    899         if (_name != null) {
    900             if ( (!isClient(_type)) || (!_sharedClient) ) {
    901                 config.setProperty("option.inbound.nickname", _name);
    902                 config.setProperty("option.outbound.nickname", _name);
    903             } else {
    904                 config.setProperty("option.inbound.nickname", CLIENT_NICKNAME);
    905                 config.setProperty("option.outbound.nickname", CLIENT_NICKNAME);
    906             }
     898        if (isClient(_type) && _sharedClient) {
     899            config.setProperty("option.inbound.nickname", CLIENT_NICKNAME);
     900            config.setProperty("option.outbound.nickname", CLIENT_NICKNAME);
     901        } else if (_name != null) {
     902            config.setProperty("option.inbound.nickname", _name);
     903            config.setProperty("option.outbound.nickname", _name);
    907904        }
    908905        if ("interactive".equals(_profile))
  • apps/i2ptunnel/jsp/index.jsp

    r7725b9e r0070abc  
    9797                case IndexBean.STARTING:
    9898          %><div class="statusStarting text">Starting...</div>
     99            <a class="control" title="Stop this Tunnel" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&amp;action=stop&amp;tunnel=<%=curClient%>">Stop</a>
     100        <%
     101                break;
     102                case IndexBean.STANDBY:
     103          %><div class="statusStarting text">Standby</div>
    99104            <a class="control" title="Stop this Tunnel" href="index.jsp?nonce=<%=indexBean.getNextNonce()%>&amp;action=stop&amp;tunnel=<%=curClient%>">Stop</a>
    100105        <%
  • apps/routerconsole/java/src/net/i2p/router/web/ReseedHandler.java

    r7725b9e r0070abc  
    9292        public void run() {
    9393            _isRunning = true;
     94            System.out.println("Reseed start");
    9495            reseed(false);
    95             System.out.println("Reseeding complete");
     96            System.out.println("Reseed complete");
    9697            System.setProperty("net.i2p.router.web.ReseedHandler.reseedInProgress", "false");
    9798            _isRunning = false;
     
    134135
    135136        /**
    136          *  Fetch a directory listing and then all the routerInfo files in the listing.
     137         *  Fetch a directory listing and then up to 200 routerInfo files in the listing.
    137138         *  The listing must contain (exactly) strings that match:
    138139         *           href="routerInfo-{hash}.dat">
     
    148149                System.setProperty("net.i2p.router.web.ReseedHandler.errorMessage","");
    149150                System.setProperty("net.i2p.router.web.ReseedHandler.statusMessage","Reseeding: fetching seed URL.");
     151                System.err.println("Reseed from " + seedURL);
    150152                URL dir = new URL(seedURL);
    151153                byte contentRaw[] = readURL(dir);
     
    161163                Set urls = new HashSet();
    162164                int cur = 0;
    163                 while (true) {
     165                int total = 0;
     166                while (total++ < 1000) {
    164167                    int start = content.indexOf("href=\"routerInfo-", cur);
    165168                    if (start < 0)
     
    171174                    cur = end + 1;
    172175                }
    173                 if (urls.size() <= 0) {
     176                if (total <= 0) {
    174177                    _log.error("Read " + contentRaw.length + " bytes from seed " + seedURL + ", but found no routerInfo URLs.");
    175178                    System.setProperty("net.i2p.router.web.ReseedHandler.errorMessage",
     
    179182                }
    180183
     184                List urlList = new ArrayList(urls);
     185                Collections.shuffle(urlList);
    181186                int fetched = 0;
    182187                int errors = 0;
    183                 for (Iterator iter = urls.iterator(); iter.hasNext(); ) {
     188                // 200 max from one URL
     189                for (Iterator iter = urlList.iterator(); iter.hasNext() && fetched < 200; ) {
    184190                    try {
    185191                        System.setProperty("net.i2p.router.web.ReseedHandler.statusMessage",
    186192                            "Reseeding: fetching router info from seed URL (" +
    187                             fetched + " successful, " + errors + " errors, " + urls.size() + " total).");
     193                            fetched + " successful, " + errors + " errors, " + total + " total).");
    188194
    189195                        fetchSeed(seedURL, (String)iter.next());
     
    198204                    }
    199205                }
    200                 if (echoStatus) System.out.println();
     206                System.err.println("Reseed got " + fetched + " router infos from " + seedURL);
    201207               
    202                 int failPercent = 100 * errors / urls.size();
     208                int failPercent = 100 * errors / total;
    203209               
    204210                // Less than 10% of failures is considered success,
     
    206212                if ((failPercent >= 10) && (failPercent < 90)) {
    207213                    System.setProperty("net.i2p.router.web.ReseedHandler.errorMessage",
    208                         "Last reseed failed partly (" + failPercent + "% of " + urls.size() + "). " +
     214                        "Last reseed failed partly (" + failPercent + "% of " + total + "). " +
    209215                        RESEED_TIPS);
    210216                }
    211217                if (failPercent >= 90) {
    212218                    System.setProperty("net.i2p.router.web.ReseedHandler.errorMessage",
    213                         "Last reseed failed (" + failPercent + "% of " + urls.size() + "). " +
     219                        "Last reseed failed (" + failPercent + "% of " + total + "). " +
    214220                        RESEED_TIPS);
    215221                }
    216222                // Don't go on to the next URL if we have enough
    217                 if (fetched > 25)
     223                if (fetched >= 100)
    218224                    _isRunning = false;
    219225            } catch (Throwable t) {
  • apps/routerconsole/jsp/configservice.jsp

    r7725b9e r0070abc  
    3333 <input type="submit" name="action" value="Cancel graceful shutdown" />
    3434 
     35 <% if (System.getProperty("wrapper.version") != null) { %>
    3536 <p>If you want the router to restart itself after shutting down, you can choose one of
    3637 the following.  This is useful in some situations - for example, if you changed
     
    4243 <input type="submit" name="action" value="Graceful restart" />
    4344 <input type="submit" name="action" value="Hard restart" />
     45 <% } %>
    4446 
    4547 <% if ( (System.getProperty("os.name") != null) && (System.getProperty("os.name").startsWith("Win")) ) { %>
     
    6264 above, then running uninstall_i2p_service_winnt.bat.</p>
    6365 <% } %>
     66
     67 <% if (System.getProperty("wrapper.version") != null) { %>
    6468 <h4>Debugging</h4>
    6569 <p>At times, it may be helpful to debug I2P by getting a thread dump.  To do so,
     
    6771 <a href="logs.jsp#servicelogs">wrapper.log</a>.</p>
    6872 <input type="submit" name="action" value="Dump threads" />
     73 <% } %>
    6974 
    7075 <h4>Launch browser on router startup?</h4>
  • build.xml

    r7725b9e r0070abc  
    279279        </copy>
    280280        <copy file="hosts.txt" todir="pkg-temp/" />
    281         <copy file="install-headless.txt" todir="pkg-temp/" />
     281        <copy file="INSTALL-headless.txt" todir="pkg-temp/" />
    282282        <copy file="history.txt" todir="pkg-temp/" />
    283283        <mkdir dir="pkg-temp/scripts" />
  • checklist.txt

    r7725b9e r0070abc  
    1818        mtn diff -r t:i2p-0.7.(xx-1) > out.diff
    1919        vi out.diff
     20
     21Verify that no untrusted revisions were inadvertently
     22blessed by a trusted party:
     23        mtn log --brief --no-graph --to t:i2p-0.7.(xx-1) | cut -d ' ' -f 2- | sort
    2024
    2125Build and tag:
  • router/java/src/net/i2p/router/RouterWatchdog.java

    r7725b9e r0070abc  
    5050   
    5151    private boolean shutdownOnHang() {
     52        // prop default true
     53        if (!Boolean.valueOf(_context.getProperty("watchdog.haltOnHang", "true")).booleanValue())
     54            return false;
     55
    5256        // Client manager starts complaining after 10 minutes, and we run every minute,
    53         // so this will restart 20 minutes after we lose a lease, if the wrapper is present.
    54         if (_consecutiveErrors >= 10 && System.getProperty("wrapper.version") != null)
     57        // so this will restart 30 minutes after we lose a lease, if the wrapper is present.
     58        if (_consecutiveErrors >= 20 && System.getProperty("wrapper.version") != null)
    5559            return true;
    56         return Boolean.valueOf(_context.getProperty("watchdog.haltOnHang", "false")).booleanValue();
     60        return false;
    5761    }
    5862   
     
    9195            _log.error("Memory: " + DataHelper.formatSize(used) + '/' + DataHelper.formatSize(max));
    9296            if (_consecutiveErrors == 1) {
     97                _log.log(Log.CRIT, "Router appears hung!  Will restart in 20 minutes if it doesn't fix itself");
    9398                // This might work on linux...
    9499                // It won't on windows, and we can't call i2prouter.bat either, it does something
     
    97102                boolean success = sc.executeSilentAndWaitTimed("./i2prouter dump", 10);
    98103                if (success)
    99                     _log.error("DUMPED THREADS TO WRAPPER LOG");
     104                    _log.log(Log.CRIT, "Threads dumped to wrapper log");
    100105            }
    101106        }
     
    128133            dumpStatus();
    129134            if (shutdownOnHang()) {
    130                 _log.log(Log.CRIT, "Router hung!  hard restart!");
     135                _log.log(Log.CRIT, "Router hung!  Restart forced by watchdog!");
    131136                try { Thread.sleep(30*1000); } catch (InterruptedException ie) {}
    132137                // halt and not system.exit, since some of the shutdown hooks might be misbehaving
  • router/java/src/net/i2p/router/StatisticsManager.java

    r7725b9e r0070abc  
    8888        if (_includePeerRankings) {
    8989            long publishedUptime = _context.router().getUptime();
     90            boolean commentOutIn074 = RouterVersion.VERSION.equals("0.7.3");
    9091            // Don't publish these for first hour
    91             if (publishedUptime > 60*60*1000)
    92                 includeThroughput(stats);
     92            if (publishedUptime > 62*60*1000) {
     93                if (commentOutIn074)
     94                    includeThroughput(stats);
     95                else
     96                    includeAverageThroughput(stats);
     97            }
    9398            //includeRate("router.invalidMessageTime", stats, new long[] { 10*60*1000 });
    9499            //includeRate("router.duplicateMessageId", stats, new long[] { 24*60*60*1000 });
     
    224229    }
    225230
     231    /* report the same data for tx and rx, for enhanced anonymity */
     232    private void includeAverageThroughput(Properties stats) {
     233        RateStat sendRate = _context.statManager().getRate("bw.sendRate");
     234        RateStat recvRate = _context.statManager().getRate("bw.recvRate");
     235        if (sendRate == null || recvRate == null)
     236            return;
     237        Rate s = sendRate.getRate(60*60*1000);
     238        Rate r = recvRate.getRate(60*60*1000);
     239        if (s == null || r == null)
     240            return;
     241        double speed = (s.getAverageValue() + r.getAverageValue()) / 2;
     242        double max = Math.max(s.getExtremeAverageValue(), r.getExtremeAverageValue());
     243        String str = num(speed) + ';' + num(max) + ";0;0;";
     244        stats.setProperty("stat_bandwidthSendBps.60m", str);
     245        stats.setProperty("stat_bandwidthReceiveBps.60m", str);
     246    }
     247
    226248    private void includeThroughput(Properties stats) {
    227249        RateStat sendRate = _context.statManager().getRate("bw.sendRate");
    228250        if (sendRate != null) {
    229             /****
    230             if (_context.router().getUptime() > 5*60*1000) {
    231                 Rate r = sendRate.getRate(5*60*1000);
    232                 if (r != null)
    233                     stats.setProperty("stat_bandwidthSendBps.5m", num(r.getAverageValue()) + ';' + num(r.getExtremeAverageValue()) + ";0;0;");
    234             }
    235             ****/
    236251            if (_context.router().getUptime() > 60*60*1000) {
    237252                Rate r = sendRate.getRate(60*60*1000);
     
    243258        RateStat recvRate = _context.statManager().getRate("bw.recvRate");
    244259        if (recvRate != null) {
    245             /****
    246             if (_context.router().getUptime() > 5*60*1000) {
    247                 Rate r = recvRate.getRate(5*60*1000);
    248                 if (r != null)
    249                     stats.setProperty("stat_bandwidthReceiveBps.5m", num(r.getAverageValue()) + ';' + num(r.getExtremeAverageValue()) + ";0;0;");
    250             }
    251             ****/
    252260            if (_context.router().getUptime() > 60*60*1000) {
    253261                Rate r = recvRate.getRate(60*60*1000);
  • router/java/src/net/i2p/router/networkdb/kademlia/FloodOnlySearchJob.java

    r7725b9e r0070abc  
    101101            _shouldProcessDSRM = true;
    102102        if (floodfillPeers.size() <= 0) {
    103             if (_log.shouldLog(Log.ERROR))
    104                 _log.error("Running netDb searches against the floodfill peers, but we don't know any");
     103            // ask anybody, they may not return the answer but they will return a few ff peers we can go look up,
     104            // so this situation should be temporary
     105            if (_log.shouldLog(Log.WARN))
     106                _log.warn("Running netDb searches against the floodfill peers, but we don't know any");
    105107            floodfillPeers = new ArrayList(_facade.getAllRouters());
    106108            if (floodfillPeers.size() <= 0) {
  • router/java/src/net/i2p/router/networkdb/kademlia/SingleLookupJob.java

    r7725b9e r0070abc  
    99/**
    1010 * Ask the peer who sent us the DSRM for the RouterInfos.
     11 *
     12 * If we have the routerInfo already, try to refetch it from that router itself,
     13 * if we aren't already connected to that router,
     14 * which will help us establish that router as a good floodfill and speed our
     15 * integration into the network.
     16 *
    1117 * A simple version of SearchReplyJob in SearchJob.java.
    1218 * Skip the profile updates - this should be rare.
     
    2935            if (getContext().netDb().lookupRouterInfoLocally(peer) == null)
    3036                getContext().jobQueue().addJob(new SingleSearchJob(getContext(), peer, from));
     37            else if (!getContext().commSystem().isEstablished(peer))
     38                getContext().jobQueue().addJob(new SingleSearchJob(getContext(), peer, peer));
    3139        }
    3240    }
  • router/java/src/net/i2p/router/transport/FIFOBandwidthRefiller.java

    r7725b9e r0070abc  
    3535
    3636    // no longer allow unlimited bandwidth - the user must specify a value, else use defaults below (KBps)
    37     public static final int DEFAULT_INBOUND_BANDWIDTH = 64;
    38     public static final int DEFAULT_OUTBOUND_BANDWIDTH = 32;
     37    public static final int DEFAULT_INBOUND_BANDWIDTH = 96;
     38    /**
     39     *  Caution, do not make DEFAULT_OUTBOUND_BANDWIDTH * DEFAULT_SHARE_PCT > 32
     40     *  without thinking about the implications (default connection limits, for example)
     41     *  of moving the default bandwidth class from L to M, or maybe
     42     *  adjusting bandwidth class boundaries.
     43     */
     44    public static final int DEFAULT_OUTBOUND_BANDWIDTH = 40;
    3945    public static final int DEFAULT_INBOUND_BURST_BANDWIDTH = 80;
    4046    public static final int DEFAULT_OUTBOUND_BURST_BANDWIDTH = 40;
Note: See TracChangeset for help on using the changeset viewer.