Router: Fix rare NPE building garlic message (ticket #1403)

This commit is contained in:
zzz
2014-10-30 15:14:52 +00:00
parent d085f9ea66
commit bab1e05235
3 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,6 @@
2014-10-30 zzz
* Router: Fix rare NPE building garlic message (ticket #1403)
2014-10-26 zzz
* SSU: Fix ACK Sender thread dying on corrupt packet

View File

@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */
public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 16;
public final static long BUILD = 17;
/** for example "-test" */
public final static String EXTRA = "-rc";

View File

@ -220,6 +220,11 @@ class OutboundClientMessageJobHelper {
ackClove.setId(ctx.random().nextLong(I2NPMessage.MAX_ID_VALUE));
DeliveryStatusMessage dsm = buildDSM(ctx, replyToken);
GarlicMessage msg = wrapDSM(ctx, skm, dsm);
if (msg == null) {
if (log.shouldLog(Log.WARN))
log.warn("Failed to wrap ack clove");
return null;
}
ackClove.setPayload(msg);
// this does nothing, the clove is not separately encrypted
//ackClove.setRecipient(ctx.router().getRouterInfo());