Changeset 35b0e99f


Ignore:
Timestamp:
Jul 14, 2015 2:33:41 PM (5 years ago)
Author:
dg2-new <dg2-new@…>
Branches:
master
Children:
c207727, dd5f8041
Parents:
1ed1e44
Message:

I2PSnark: Fix torrent-stopping (#766)

Files:
4 edited

Legend:

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

    r1ed1e44 r35b0e99f  
    625625        pc.halt();
    626626    Storage st = storage;
     627    if (!fast)
     628        // HACK: Needed a way to distinguish between user-stop and
     629        // shutdown-stop. stopTorrent(true) is in stopAllTorrents().
     630        // (#766)
     631        stopped = true;
    627632    if (st != null) {
    628633        // TODO: Cache the config-in-mem to compare vs config-on-disk
     
    639644        }
    640645    }
    641     stopped = true;
     646    if (fast)
     647        // HACK: See above if(!fast)
     648        stopped = true;
    642649    if (pc != null && _peerCoordinatorSet != null)
    643650        _peerCoordinatorSet.remove(pc);
  • apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java

    r1ed1e44 r35b0e99f  
    106106    public static final String PROP_OLD_AUTO_START = "i2snark.autoStart";   // oops
    107107    public static final String PROP_AUTO_START = "i2psnark.autoStart";      // convert in migration to new config file
    108     public static final String DEFAULT_AUTO_START = "true";
     108    public static final String DEFAULT_AUTO_START = "false";
    109109    //public static final String PROP_LINK_PREFIX = "i2psnark.linkPrefix";
    110110    //public static final String DEFAULT_LINK_PREFIX = "file:///";
     
    12791279        } else {
    12801280            running = false;
    1281         }       
     1281        }
    12821282        // Were we running last time?
    12831283        if (!dontAutoStart && shouldAutoStart() && running) {
     
    14391439            if (snark != null) {
    14401440                addMessage(_("Torrent with this info hash is already running: {0}", snark.getBaseName()));
    1441                 saveTorrentStatus(metainfo, bitfield, null, baseFile, true, 0, false); // no file priorities
    14421441                return false;
    14431442            } else {
     
    21302129                    // Snark.fatal() throws a RuntimeException
    21312130                    // don't let one bad torrent kill the whole loop
    2132                     addTorrent(name, null, !shouldAutoStart());
     2131                    addTorrent(name, null, false);
    21332132                } catch (Exception e) {
    21342133                    addMessage(_("Error: Could not add the torrent {0}", name) + ": " + e);
  • router/java/src/net/i2p/router/RouterVersion.java

    r1ed1e44 r35b0e99f  
    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/kademlia/IterativeLookupJob.java

    r1ed1e44 r35b0e99f  
    6969                    RouterInfo ri = getContext().netDb().lookupRouterInfoLocally(peer);
    7070                    if (ri == null) {
    71                         // Take it on faith that its ff to speed things up, we don't need the RI
     71                        // Take it on faith that it's ff to speed things up, we don't need the RI
    7272                        // to query it.
    7373                        // Zero-hop outbound tunnel will be failed in ISJ.sendQuery()
Note: See TracChangeset for help on using the changeset viewer.