* i2psnark: Fix bug preventing Robert from connecting to snark (thx sponge)

This commit is contained in:
zzz
2011-05-28 20:11:52 +00:00
parent c9c35a3e5a
commit 1eb58a84df
3 changed files with 7 additions and 3 deletions

View File

@ -130,7 +130,8 @@ public class PeerAcceptor
}
}
private static final int LOOKAHEAD_SIZE = "19".length() +
/** 48 */
private static final int LOOKAHEAD_SIZE = 1 + // chr(19)
"BitTorrent protocol".length() +
8 + // blank, reserved
20; // infohash
@ -144,7 +145,7 @@ public class PeerAcceptor
if (read != buf.length)
throw new IOException("Unable to read the hash (read " + read + ")");
byte rv[] = new byte[20];
System.arraycopy(buf, buf.length-rv.length-1, rv, 0, rv.length);
System.arraycopy(buf, buf.length-rv.length, rv, 0, rv.length);
return rv;
}
}

View File

@ -1,3 +1,6 @@
2011-05-28 zzz
* i2psnark: Fix bug preventing Robert from connecting to snark (thx sponge)
2011-05-27 zzz
* Console: Fix router.updateThroughProxy being set to false after saving
change on /configupdate when install dir is read-only.

View File

@ -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 = 10;
public final static long BUILD = 11;
/** for example "-test" */
public final static String EXTRA = "";