Changeset addd2e6


Ignore:
Timestamp:
Nov 10, 2013 10:22:10 PM (7 years ago)
Author:
dg2-new <dg2-new@…>
Branches:
master
Children:
108039d
Parents:
69489dd (diff), 5c38d5a (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:

merge of '3f85581f65aedde0f96729d197aaab223174f2e4'

and '6df9f4e154d148867ee158cbe9e9acf3fb73d680'

Files:
23 edited

Legend:

Unmodified
Added
Removed
  • apps/i2psnark/java/src/org/klomp/snark/MetaInfo.java

    r69489dd raddd2e6  
    518518   */
    519519  boolean checkPiece(PartialPiece pp) {
    520     MessageDigest sha1 = SHA1.getInstance();
    521520    int piece = pp.getPiece();
    522521    byte[] hash;
  • apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java

    r69489dd raddd2e6  
    755755     */
    756756    public void saveOpenTrackers(List<String> ot) {
    757         String val = setListConfig(PROP_OPENTRACKERS, ot);
     757        setListConfig(PROP_OPENTRACKERS, ot);
    758758        if (ot == null)
    759759            ot = Collections.singletonList(I2PSnarkUtil.DEFAULT_OPENTRACKERS);
  • apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java

    r69489dd raddd2e6  
    25492549                buf.append("<td class=\"priority\">");
    25502550                File f = item;
    2551                 if ((!complete) && (!item.isDirectory()) && f != null) {
     2551                if ((!complete) && (!item.isDirectory())) {
    25522552                    int pri = snark.getStorage().getPriority(f.getCanonicalPath());
    25532553                    buf.append("<input type=\"radio\" value=\"5\" name=\"pri.").append(f.getCanonicalPath()).append("\" ");
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/IndexBean.java

    r69489dd raddd2e6  
    274274       
    275275        Properties config = getConfig();
    276         if (config == null)
    277             return "Invalid params";
    278276       
    279277        if (cur == null) {
     
    971969        TunnelController tun = getController(_tunnel);
    972970        Properties config = getConfig();
    973         if (config == null)
    974             return "Invalid params";
    975971        if (tun == null) {
    976972            // creating new
     
    10391035        TunnelController tun = getController(_tunnel);
    10401036        Properties config = getConfig();
    1041         if (config == null)
    1042             return "Invalid params";
    10431037        if (tun == null) {
    10441038            // creating new
  • apps/streaming/java/src/net/i2p/client/streaming/ConnectionDataReceiver.java

    r69489dd raddd2e6  
    9494        if (doSend) {
    9595            PacketLocal packet = send(buf, off, size);
    96             if (packet == null) return _dummyStatus;
     96            // this shouldn't be null
     97            //if (packet == null) return _dummyStatus;
    9798           
    9899            //dont wait for non-acks
  • core/java/src/net/i2p/crypto/DSAEngine.java

    r69489dd raddd2e6  
    599599        SigType type = privateKey.getType();
    600600        String algo = getRawAlgo(type);
    601         java.security.Signature jsig = java.security.Signature.getInstance(algo);
    602601        PrivateKey privKey = SigUtil.toJavaKey(privateKey);
    603602        return altSignRaw(algo, hash, privKey, type);
  • core/java/src/net/i2p/crypto/SigUtil.java

    r69489dd raddd2e6  
    176176        SigType type = pk.getType();
    177177        int len = type.getPubkeyLen();
    178         int sublen = len / 2;
    179178        byte[] b = pk.getData();
    180179        BigInteger s = new NativeBigInteger(1, b);
  • core/java/src/net/i2p/util/Clock.java

    r69489dd raddd2e6  
    114114     * @return the current delta from System.currentTimeMillis() in milliseconds
    115115     */
    116     public long getOffset() {
     116    public synchronized long getOffset() {
    117117        return _offset;
    118118    }
  • core/java/src/net/i2p/util/SimpleTimer.java

    r69489dd raddd2e6  
    150150            // FIXME if you plan to use this class again
    151151            while (_events.containsKey(time))
    152                 time = new Long(time.longValue() + 1);
     152                time = Long.valueOf(time.longValue() + 1);
    153153            _events.put(time, event);
    154154            _eventTimes.put(event, time);
  • router/java/src/net/i2p/router/MessageHistory.java

    r69489dd raddd2e6  
    375375        buf.append("timed out waiting for a reply to [").append(sentMessage.getMessageType());
    376376        buf.append("] [").append(sentMessage.getMessageId()).append("] expiring on [");
    377         if (sentMessage != null)
    378             buf.append(getTime(sentMessage.getReplySelector().getExpiration()));
     377        buf.append(getTime(sentMessage.getReplySelector().getExpiration()));
    379378        buf.append("] ").append(sentMessage.getReplySelector().toString());
    380379        addEntry(buf.toString());
  • router/java/src/net/i2p/router/StatisticsManager.java

    r69489dd raddd2e6  
    8787        if (_context.getBooleanPropertyDefaultTrue(PROP_PUBLISH_RANKINGS) &&
    8888            _context.random().nextInt(RANDOM_INCLUDE_STATS) == 0) {
    89             long publishedUptime = _context.router().getUptime();
     89            //long publishedUptime = _context.router().getUptime();
    9090            // Don't publish these for first hour
    9191            // Disabled in 0.9
  • router/java/src/net/i2p/router/TunnelPoolSettings.java

    r69489dd raddd2e6  
    284284   
    285285    private static final boolean getBoolean(String str, boolean defaultValue) {
    286         if (str == null) return defaultValue;
    287286        boolean v = Boolean.parseBoolean(str) ||
    288287                    (str != null && "YES".equals(str.toUpperCase(Locale.US)));
  • router/java/src/net/i2p/router/networkdb/HandleDatabaseLookupMessageJob.java

    r69489dd raddd2e6  
    224224        if (info == null) return true;
    225225        String cap = info.getCapabilities();
    226         if (cap == null) return false;
    227226        return cap.indexOf(Router.CAPABILITY_REACHABLE) >= 0;
    228227    }
  • router/java/src/net/i2p/router/networkdb/kademlia/FloodfillPeerSelector.java

    r69489dd raddd2e6  
    311311            return rv;
    312312        Collection<RouterAddress> paddr = pinfo.getAddresses();
    313         if (paddr == null)
    314             return rv;
    315313        for (RouterAddress pa : paddr) {
    316314            byte[] pib = pa.getIP();
  • router/java/src/net/i2p/router/networkdb/kademlia/KademliaNetworkDatabaseFacade.java

    r69489dd raddd2e6  
    927927    void dropAfterLookupFailed(Hash peer) {
    928928        _context.peerManager().removeCapabilities(peer);
    929         boolean removed = _kb.remove(peer);
     929        _kb.remove(peer);
    930930        //if (removed) {
    931931        //    if (_log.shouldLog(Log.INFO))
  • router/java/src/net/i2p/router/peermanager/ProfileOrganizer.java

    r69489dd raddd2e6  
    12711271            return rv;
    12721272        Collection<RouterAddress> paddr = pinfo.getAddresses();
    1273         if (paddr == null)
    1274             return rv;
    12751273        for (RouterAddress pa : paddr) {
    12761274            byte[] pib = pa.getIP();
  • router/java/src/net/i2p/router/transport/OutboundMessageRegistry.java

    r69489dd raddd2e6  
    140140                    if (o instanceof OutNetMessage) {
    141141                        msg = (OutNetMessage)o;
    142                         if (msg != null)
    143                             rv.add(msg);
     142                        rv.add(msg);
    144143                    } else if (o instanceof List) {
    145144                        msgs = (List<OutNetMessage>)o;
    146                         if (msgs != null)
    147                             rv.addAll(msgs);
     145                        rv.addAll(msgs);
    148146                    }
    149147                }
  • router/java/src/net/i2p/router/transport/crypto/DHSessionKeyBuilder.java

    r69489dd raddd2e6  
    230230    }
    231231
    232     public BigInteger getPeerPublicValue() {
     232    public synchronized BigInteger getPeerPublicValue() {
    233233        return _peerValue;
    234234    }
  • router/java/src/net/i2p/router/transport/ntcp/NTCPTransport.java

    r69489dd raddd2e6  
    953953        } else if (enabled.equals("false") &&
    954954                   name != null && name.length() > 0 &&
    955                    !name.equals(ohost) &&
    956                    nport != null) {
     955                   !name.equals(ohost)) {
    957956            // Host name is configured, and we have a port (either auto or configured)
    958957            // but we probably only get here if the port is auto,
  • router/java/src/net/i2p/router/transport/udp/EstablishmentManager.java

    r69489dd raddd2e6  
    13071307        // should have already been removed in handleOutbound() above
    13081308        // remove only if value == state
    1309         boolean removed = _outboundStates.remove(outboundState.getRemoteHostId(), outboundState);
     1309        _outboundStates.remove(outboundState.getRemoteHostId(), outboundState);
    13101310        if (outboundState.getState() != OB_STATE_CONFIRMED_COMPLETELY) {
    13111311            if (_log.shouldLog(Log.INFO))
  • router/java/src/net/i2p/router/transport/udp/OutboundMessageFragments.java

    r69489dd raddd2e6  
    151151     */
    152152    public void add(OutNetMessage msg) {
    153         I2NPMessage msgBody = msg.getMessage();
    154153        RouterInfo target = msg.getTarget();
    155154        if (target == null)
  • router/java/src/net/i2p/router/tunnel/OutboundTunnelEndpoint.java

    r69489dd raddd2e6  
    5959                _log.debug("outbound tunnel " + _config + " received a full message: " + msg
    6060                           + " to be forwarded on to "
    61                            + (toRouter != null ? toRouter.toBase64().substring(0,4) : "")
     61                           + toRouter.toBase64().substring(0,4)
    6262                           + (toTunnel != null ? ":" + toTunnel.getTunnelId() : ""));
    6363            int size = msg.getMessageSize();
  • router/java/src/net/i2p/router/tunnel/pool/TunnelPeerSelector.java

    r69489dd raddd2e6  
    349349    private static boolean shouldExclude(RouterContext ctx, Log log, RouterInfo peer, char excl[]) {
    350350        String cap = peer.getCapabilities();
    351         if (cap == null) {
    352             return true;
    353         }
    354351        for (int j = 0; j < excl.length; j++) {
    355352            if (cap.indexOf(excl[j]) >= 0) {
Note: See TracChangeset for help on using the changeset viewer.