forked from I2P_Developers/i2p.i2p
propagate from branch 'i2p.i2p.zzz.jetty7' (head 12e512b792594fe6a291ad3ab303fca30228391b)
to branch 'i2p.i2p' (head f3775dd82af85ba335258bd9f0fc06131a1daaa9)
This commit is contained in:
@@ -222,17 +222,9 @@ public class DatabaseLookupMessage extends FastI2NPMessageImpl {
|
||||
curIndex += Hash.HASH_LENGTH;
|
||||
//_fromHash = new Hash(fromData);
|
||||
|
||||
boolean tunnelSpecified = false;
|
||||
switch (data[curIndex]) {
|
||||
case DataHelper.BOOLEAN_TRUE:
|
||||
tunnelSpecified = true;
|
||||
break;
|
||||
case DataHelper.BOOLEAN_FALSE:
|
||||
tunnelSpecified = false;
|
||||
break;
|
||||
default:
|
||||
throw new I2NPMessageException("Tunnel must be explicitly specified (or not)");
|
||||
}
|
||||
// as of 0.9.6, ignore other 7 bits of the flag byte
|
||||
// TODO store the whole flag byte
|
||||
boolean tunnelSpecified = (data[curIndex] & 0x01) != 0;
|
||||
curIndex++;
|
||||
|
||||
if (tunnelSpecified) {
|
||||
@@ -277,13 +269,14 @@ public class DatabaseLookupMessage extends FastI2NPMessageImpl {
|
||||
curIndex += Hash.HASH_LENGTH;
|
||||
System.arraycopy(_fromHash.getData(), 0, out, curIndex, Hash.HASH_LENGTH);
|
||||
curIndex += Hash.HASH_LENGTH;
|
||||
// TODO allow specification of the other 7 bits of the flag byte
|
||||
if (_replyTunnel != null) {
|
||||
out[curIndex++] = DataHelper.BOOLEAN_TRUE;
|
||||
out[curIndex++] = 0x01;
|
||||
byte id[] = DataHelper.toLong(4, _replyTunnel.getTunnelId());
|
||||
System.arraycopy(id, 0, out, curIndex, 4);
|
||||
curIndex += 4;
|
||||
} else {
|
||||
out[curIndex++] = DataHelper.BOOLEAN_FALSE;
|
||||
out[curIndex++] = 0x00;
|
||||
}
|
||||
if ( (_dontIncludePeers == null) || (_dontIncludePeers.isEmpty()) ) {
|
||||
out[curIndex++] = 0x0;
|
||||
|
@@ -78,6 +78,7 @@ public class HandleDatabaseLookupMessageJob extends JobImpl {
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO only look up once, then check type
|
||||
LeaseSet ls = getContext().netDb().lookupLeaseSetLocally(_message.getSearchKey());
|
||||
if (ls != null) {
|
||||
// We have to be very careful here to decide whether or not to send out the leaseSet,
|
||||
|
Reference in New Issue
Block a user