forked from I2P_Developers/i2p.i2p
log tweaks, final
This commit is contained in:
@@ -25,7 +25,7 @@ import net.i2p.data.Hash;
|
||||
public class DatabaseSearchReplyMessage extends FastI2NPMessageImpl {
|
||||
public final static int MESSAGE_TYPE = 3;
|
||||
private Hash _key;
|
||||
private List<Hash> _peerHashes;
|
||||
private final List<Hash> _peerHashes;
|
||||
private Hash _from;
|
||||
|
||||
public DatabaseSearchReplyMessage(I2PAppContext context) {
|
||||
@@ -93,12 +93,11 @@ public class DatabaseSearchReplyMessage extends FastI2NPMessageImpl {
|
||||
protected int calculateWrittenLength() {
|
||||
return Hash.HASH_LENGTH + 1 + getNumReplies()*Hash.HASH_LENGTH + Hash.HASH_LENGTH;
|
||||
}
|
||||
|
||||
/** write the message body to the output array, starting at the given index */
|
||||
protected int writeMessageBody(byte out[], int curIndex) throws I2NPMessageException {
|
||||
if (_key == null)
|
||||
throw new I2NPMessageException("Key in reply to not specified");
|
||||
if (_peerHashes == null)
|
||||
throw new I2NPMessageException("Peer replies are null");
|
||||
if (_from == null)
|
||||
throw new I2NPMessageException("No 'from' address specified!");
|
||||
|
||||
|
@@ -10,6 +10,7 @@ package net.i2p.data.i2np;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.Date;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.data.DatabaseEntry;
|
||||
@@ -258,14 +259,16 @@ public class DatabaseStoreMessage extends FastI2NPMessageImpl {
|
||||
public String toString() {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
buf.append("[DatabaseStoreMessage: ");
|
||||
buf.append("\n\tExpiration: ").append(_expiration);
|
||||
buf.append("\n\tExpiration: ").append(new Date(_expiration));
|
||||
buf.append("\n\tUnique ID: ").append(_uniqueId);
|
||||
if (_replyToken != 0) {
|
||||
buf.append("\n\tReply token: ").append(_replyToken);
|
||||
buf.append("\n\tReply tunnel: ").append(_replyTunnel);
|
||||
buf.append("\n\tReply gateway: ").append(_replyGateway);
|
||||
}
|
||||
buf.append("\n\tKey: ").append(getKey());
|
||||
buf.append("\n\tEntry: ").append(_dbEntry);
|
||||
buf.append("\n\tReply token: ").append(_replyToken);
|
||||
buf.append("\n\tReply tunnel: ").append(_replyTunnel);
|
||||
buf.append("\n\tReply gateway: ").append(_replyGateway);
|
||||
buf.append("]");
|
||||
buf.append(']');
|
||||
return buf.toString();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user