From 38c8e017a80f867a6cf528fe4e3edab68a840548 Mon Sep 17 00:00:00 2001 From: zzz Date: Sat, 28 Nov 2015 13:01:00 +0000 Subject: [PATCH] i2psnark: Increase max pieces to 32K --- .../java/src/org/klomp/snark/Storage.java | 4 ++-- history.txt | 21 ++++++++++++++----- .../src/net/i2p/router/RouterVersion.java | 2 +- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/apps/i2psnark/java/src/org/klomp/snark/Storage.java b/apps/i2psnark/java/src/org/klomp/snark/Storage.java index 0fff5b885e..1a8349f5f7 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/Storage.java +++ b/apps/i2psnark/java/src/org/klomp/snark/Storage.java @@ -80,7 +80,7 @@ public class Storage implements Closeable /** bigger than this will be rejected */ public static final int MAX_PIECE_SIZE = 16*1024*1024; /** The maximum number of pieces in a torrent. */ - public static final int MAX_PIECES = 20*1024; + public static final int MAX_PIECES = 32*1024; public static final long MAX_TOTAL_SIZE = MAX_PIECE_SIZE * (long) MAX_PIECES; private static final Map _filterNameCache = new ConcurrentHashMap(); @@ -166,7 +166,7 @@ public class Storage implements Closeable else pc_size = DEFAULT_PIECE_SIZE; int pcs = (int) ((total - 1)/pc_size) + 1; - while (pcs > (MAX_PIECES * 2 / 3) && pc_size < MAX_PIECE_SIZE) + while (pcs > (MAX_PIECES / 3) && pc_size < MAX_PIECE_SIZE) { pc_size *= 2; pcs = (int) ((total - 1)/pc_size) +1; diff --git a/history.txt b/history.txt index b95b9b7199..c29478300c 100644 --- a/history.txt +++ b/history.txt @@ -1,15 +1,26 @@ +2015-11-28 zzz + * i2psnark: + - Fix NPE caused by URL-to-URI conversion in -2 (ticket #1715) + - Increase max pieces to 32K + +2015-11-27 zzz + * SAM: + - Use DataHelper to load/store sam.keys + - Move sam.keys to config dir (ticket #677) + 2015-11-27 zzz Prop from i2p.i2p.zzz.sam: * PasswordManager: new methods for use by SAM * SAM: - Use getopt for SAM args processing - Change default host from 0.0.0.0 to 127.0.0.1 - - Add SSL support with -s option + - Add SSL support with -s option (ticket #1106) - Add -c configfile option, default sam.config - - Add protocol and port notification - - Add authorization options in HELLO + - Add protocol and port notification (ticket #1323) + - Add authorization options in HELLO (ticket #1106) - Add AUTH commands: ENABLE, DISABLE, ADD, REMOVE - - Add PING, PONG, QUIT, STOP, EXIT commands + - Add PING, PONG commands (tickets #1572, #1573) + - Add QUIT, STOP, EXIT commands - Add SSL option for STREAM FORWARD - Move DatagramServer from SAMv3Handler to its own file - Make DatagramServer a Handler, register with bridge @@ -18,7 +29,7 @@ Prop from i2p.i2p.zzz.sam: - Add HEADER option for RAW forwarding - Better exception handling - Extensive enhancements to Java client for testing - - Bump version to 3.2 + - Bump version to 3.2 (ticket #1574) * Streaming: Fix recognition of PoisonPacket in ConnectionHandler 2015-11-22 zzz diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 0725033fa6..f6e6df3a5c 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -18,7 +18,7 @@ public class RouterVersion { /** deprecated */ public final static String ID = "Monotone"; public final static String VERSION = CoreVersion.VERSION; - public final static long BUILD = 3; + public final static long BUILD = 4; /** for example "-test" */ public final static String EXTRA = "";