I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 76078deb authored by zzz's avatar zzz
Browse files

handle numeric private value in metainfo

parent 1b95a03d
No related branches found
No related tags found
No related merge requests found
......@@ -216,7 +216,16 @@ public class MetaInfo
// BEP 27
val = info.get("private");
privateTorrent = val != null && val.getString().equals("1");
if (val != null) {
Object o = val.getValue();
// Is it supposed to be a number or a string?
// i2psnark does it as a string. BEP 27 doesn't say.
// Transmission does numbers.
privateTorrent = "1".equals(o) ||
((o instanceof Number) && ((Number) o).intValue() == 1);
} else {
privateTorrent = false;
}
val = info.get("piece length");
if (val == null)
......
......@@ -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 = 24;
public final static long BUILD = 25;
/** for example "-test" */
public final static String EXTRA = "";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment