* BOB, SAM, i2psnark: Fix datagram NPE (ticket #1275)

This could only happen on an extremely overloaded router.
This commit is contained in:
zzz
2014-05-13 18:45:54 +00:00
parent 197be5f60f
commit 8480a204ea
5 changed files with 13 additions and 3 deletions

View File

@@ -106,8 +106,10 @@ public class UDPIOthread implements I2PSessionListener, Runnable {
// _log.debug("Message available: id = " + msgId + " size = " + size);
try {
byte msg[] = session.receiveMessage(msgId);
if (msg != null) {
out.write(msg);
out.flush();
}
} catch (I2PSessionException ise) {
up = false;
} catch (IOException ioe) {

View File

@@ -1536,6 +1536,8 @@ public class KRPC implements I2PSessionMuxedListener, DHT {
// TODO throttle
try {
byte[] payload = session.receiveMessage(msgId);
if (payload == null)
return;
_rxPkts.incrementAndGet();
_rxBytes.addAndGet(payload.length);
if (toPort == _qPort) {

View File

@@ -234,6 +234,8 @@ public abstract class SAMMessageSession {
}
try {
byte msg[] = session.receiveMessage(msgId);
if (msg == null)
return;
if (_log.shouldLog(Log.DEBUG)) {
_log.debug("Content of message " + msgId + ":\n"
+ HexDump.dump(msg));

View File

@@ -1,3 +1,7 @@
2014-05-13 zzz
* BOB, SAM, i2psnark: Fix datagram NPE (ticket #1275)
* SusiMail: Fix AIOOBE (ticket #1269)
2014-05-10 zzz
* NTCP: Fix NPE (ticket #996)
* SusiMail: Remove deleted mails from memory

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 = 17;
public final static long BUILD = 18;
/** for example "-test" */
public final static String EXTRA = "-rc";