UDP fix and comments
This commit is contained in:
@ -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
|
||||
|
||||
|
@ -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 = "";
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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) {
|
||||
|
Reference in New Issue
Block a user