Author: toad
Date: 2007-10-25 16:27:59 +0000 (Thu, 25 Oct 2007)
New Revision: 15560
Modified:
trunk/freenet/src/freenet/node/OpennetManager.java
Log:
Send the new messages.
Send the data transfers on a new UID specified in the new messages.
Modified: trunk/freenet/src/freenet/node/OpennetManager.java
===================================================================
--- trunk/freenet/src/freenet/node/OpennetManager.java 2007-10-25 16:25:21 UTC
(rev 15559)
+++ trunk/freenet/src/freenet/node/OpennetManager.java 2007-10-25 16:27:59 UTC
(rev 15560)
@@ -482,13 +482,17 @@
}
System.arraycopy(noderef, 0, padded, 0, noderef.length);
peer.sendAsync(msg, null, 0, ctr);
+ long xferUID = node.random.nextLong();
+ Message msg2 = isReply ?
DMT.createFNPOpennetConnectReplyNew(uid, xferUID, noderef.length,
padded.length) :
+ DMT.createFNPOpennetConnectDestinationNew(uid, xferUID,
noderef.length, padded.length);
+ peer.sendAsync(msg2, null, 0, ctr);
ByteArrayRandomAccessThing raf = new
ByteArrayRandomAccessThing(padded);
raf.setReadOnly();
PartiallyReceivedBulk prb =
new PartiallyReceivedBulk(node.usm, padded.length,
Node.PACKET_SIZE, raf, true);
try {
BulkTransmitter bt =
- new BulkTransmitter(prb, peer, uid,
node.outputThrottle, true);
+ new BulkTransmitter(prb, peer, xferUID,
node.outputThrottle, true);
bt.send();
} catch (DisconnectedException e) {
throw new NotConnectedException(e);