UDP fix and comments

This commit is contained in:
zzz
2010-06-13 16:42:24 +00:00
parent 34a1085604
commit 364b905790
5 changed files with 16 additions and 2 deletions

View File

@ -1,3 +1,11 @@
2010-06-13 zzz
* Console: Add some divs for languages to news and readmes
* HTTP Proxy: Pass different User Agent to outproxy
* i2psnark:
- Move config to separate page
- Icon tweaks
* Translation: zh fix
2010-06-12 welterde
* fixed possible race-condition and improved code style in ObjectCounter utility class

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

View File

@ -323,6 +323,7 @@ public class OutboundMessageFragments {
List<ACKBitfield> partialACKBitfields = new ArrayList();
peer.fetchPartialACKs(partialACKBitfields);
int piggybackedPartialACK = partialACKBitfields.size();
// getCurrentFullACKs() already makes a copy, do we need to copy again?
List<Long> remaining = new ArrayList(msgIds);
int sparseCount = 0;
UDPPacket rv[] = new UDPPacket[fragments]; //sparse

View File

@ -123,6 +123,7 @@ public class PacketBuilder {
for (int i = 0; i < ackIdsRemaining.size(); i++) {
//while (ackIdsRemaining.size() > 0) {
Long ackId = ackIdsRemaining.get(i);//(Long)ackIdsRemaining.remove(0);
// NPE here, how did a null get in the List?
DataHelper.toLong(data, off, 4, ackId.longValue());
off += 4;
if (msg != null) // logging it

View File

@ -1546,7 +1546,11 @@ public class PeerState {
oldPeer._dead = true;
List<Long> tmp = new ArrayList();
tmp.addAll(oldPeer._currentACKs);
// AIOOBE from concurrent access
//tmp.addAll(oldPeer._currentACKs);
for (Long l : oldPeer._currentACKs) {
tmp.add(l);
}
oldPeer._currentACKs.clear();
if (!_dead) {