forked from I2P_Developers/i2p.i2p
merge of '0d9093cdc66fad9b4827931caa079ad00f2a76f7'
and '8aecdabbd225a6ea26a3c20725aeabfedf2dbe1d'
This commit is contained in:
@ -40,10 +40,12 @@ public class QueuedI2CPMessageReader extends I2CPMessageReader {
|
||||
I2CPMessage msg = null;
|
||||
try {
|
||||
msg = in.take();
|
||||
if (msg.getType() == PoisonI2CPMessage.MESSAGE_TYPE)
|
||||
if (msg.getType() == PoisonI2CPMessage.MESSAGE_TYPE) {
|
||||
_listener.disconnected(QueuedI2CPMessageReader.this);
|
||||
cancelRunner();
|
||||
else
|
||||
} else {
|
||||
_listener.messageReceived(QueuedI2CPMessageReader.this, msg);
|
||||
}
|
||||
} catch (InterruptedException ie) {}
|
||||
}
|
||||
// ??? unused
|
||||
|
@ -102,7 +102,8 @@ public class SessionEncryptionTest extends TestCase{
|
||||
|
||||
|
||||
|
||||
_context.sessionKeyManager().tagsDelivered(pubKey, curKey, firstTags);
|
||||
TagSetHandle tsh = _context.sessionKeyManager().tagsDelivered(pubKey, curKey, firstTags);
|
||||
_context.sessionKeyManager().tagsAcked(pubKey, curKey, tsh);
|
||||
|
||||
curKey = _context.sessionKeyManager().getCurrentKey(pubKey);
|
||||
SessionTag curTag = _context.sessionKeyManager().consumeNextAvailableTag(pubKey, curKey);
|
||||
@ -130,7 +131,8 @@ public class SessionEncryptionTest extends TestCase{
|
||||
|
||||
|
||||
|
||||
_context.sessionKeyManager().tagsDelivered(pubKey, curKey, secondTags);
|
||||
tsh = _context.sessionKeyManager().tagsDelivered(pubKey, curKey, secondTags);
|
||||
_context.sessionKeyManager().tagsAcked(pubKey, curKey, tsh);
|
||||
|
||||
curKey = _context.sessionKeyManager().getCurrentKey(pubKey);
|
||||
curTag = _context.sessionKeyManager().consumeNextAvailableTag(pubKey, curKey);
|
||||
@ -199,7 +201,8 @@ public class SessionEncryptionTest extends TestCase{
|
||||
|
||||
|
||||
|
||||
_context.sessionKeyManager().tagsDelivered(pubKey, curKey, firstTags);
|
||||
TagSetHandle tsh = _context.sessionKeyManager().tagsDelivered(pubKey, curKey, firstTags);
|
||||
_context.sessionKeyManager().tagsAcked(pubKey, curKey, tsh);
|
||||
|
||||
curKey = _context.sessionKeyManager().getCurrentKey(pubKey);
|
||||
SessionTag curTag = _context.sessionKeyManager().consumeNextAvailableTag(pubKey, curKey);
|
||||
@ -226,7 +229,8 @@ public class SessionEncryptionTest extends TestCase{
|
||||
|
||||
|
||||
|
||||
_context.sessionKeyManager().tagsDelivered(pubKey, nextKey, secondTags); // note nextKey not curKey
|
||||
tsh = _context.sessionKeyManager().tagsDelivered(pubKey, nextKey, secondTags); // note nextKey not curKey
|
||||
_context.sessionKeyManager().tagsAcked(pubKey, nextKey, tsh);
|
||||
|
||||
curKey = _context.sessionKeyManager().getCurrentKey(pubKey);
|
||||
curTag = _context.sessionKeyManager().consumeNextAvailableTag(pubKey, curKey);
|
||||
@ -288,9 +292,11 @@ public class SessionEncryptionTest extends TestCase{
|
||||
|
||||
if ( (tags != null) && (tags.size() > 0) ) {
|
||||
if (nextKey == null) {
|
||||
_context.sessionKeyManager().tagsDelivered(pubKey, curKey, tags);
|
||||
TagSetHandle tsh = _context.sessionKeyManager().tagsDelivered(pubKey, curKey, tags);
|
||||
_context.sessionKeyManager().tagsAcked(pubKey, curKey, tsh);
|
||||
} else {
|
||||
_context.sessionKeyManager().tagsDelivered(pubKey, nextKey, tags);
|
||||
TagSetHandle tsh = _context.sessionKeyManager().tagsDelivered(pubKey, nextKey, tags);
|
||||
_context.sessionKeyManager().tagsAcked(pubKey, nextKey, tsh);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user