diff --git a/router/java/src/net/i2p/data/i2np/DataMessage.java b/router/java/src/net/i2p/data/i2np/DataMessage.java index d8411b2b6..10131db35 100644 --- a/router/java/src/net/i2p/data/i2np/DataMessage.java +++ b/router/java/src/net/i2p/data/i2np/DataMessage.java @@ -99,8 +99,7 @@ public class DataMessage extends FastI2NPMessageImpl { @Override public String toString() { StringBuilder buf = new StringBuilder(); - buf.append("[DataMessage: "); - buf.append("\n\tData: "); + buf.append("[DataMessage: data "); if (_data != null) { buf.append(_data.length).append(" bytes"); if (_data.length <= 64) @@ -108,7 +107,7 @@ public class DataMessage extends FastI2NPMessageImpl { } else { buf.append("null"); } - buf.append("]"); + buf.append(']'); return buf.toString(); } } diff --git a/router/java/src/net/i2p/data/i2np/DeliveryInstructions.java b/router/java/src/net/i2p/data/i2np/DeliveryInstructions.java index 1b7df28c2..81fadcd53 100644 --- a/router/java/src/net/i2p/data/i2np/DeliveryInstructions.java +++ b/router/java/src/net/i2p/data/i2np/DeliveryInstructions.java @@ -445,25 +445,28 @@ public class DeliveryInstructions extends DataStructureImpl { buf.append("\n\tDelivery mode: "); switch (getDeliveryMode()) { case DELIVERY_MODE_LOCAL: - buf.append("local"); + buf.append("Local"); break; case DELIVERY_MODE_DESTINATION: - buf.append("destination"); + buf.append("Destination"); break; case DELIVERY_MODE_ROUTER: - buf.append("router"); + buf.append("Router"); break; case DELIVERY_MODE_TUNNEL: - buf.append("tunnel"); + buf.append("Tunnel"); break; } - buf.append("\n\tDelay requested: ").append(getDelayRequested()); - buf.append("\n\tDelay seconds: ").append(getDelaySeconds()); - buf.append("\n\tDestination: ").append(getDestination()); + if (_delayRequested) + buf.append("\n\tDelay seconds: ").append(_delaySeconds); + if (_destinationHash != null) + buf.append("\n\tDestination: ").append(_destinationHash.toBase32()); //buf.append("\n\tEncrypted: ").append(getEncrypted()); - buf.append("\n\tEncryption key: ").append(getEncryptionKey()); - buf.append("\n\tRouter: ").append(getRouter()); - buf.append("\n\tTunnelId: ").append(getTunnelId()); + //buf.append("\n\tEncryption key: ").append(getEncryptionKey()); + if (_routerHash != null) + buf.append("\n\tRouter: ").append(_routerHash.toBase64()); + if (_tunnelId != null) + buf.append("\n\tTunnelId: ").append(_tunnelId); return buf.toString(); }