Closed GoogleCodeExporter closed 8 years ago
I think the issue is that the overflow is not handled at all and keep looping
on a buffer of the same size. So your fix will make sure that the CPU doesn't
get to 100% as it will exit after a number of tries but will not solve the
issue of accepting the big packet I think which will lead to lost calls or call
setup.
I think a better fix would be to increase the buffer size and retry such as the
code snippet below
if(result.getStatus().equals(Status.BUFFER_OVERFLOW)) {
if(logger.isLoggingEnabled(LogWriter.TRACE_DEBUG)) {
logger.logDebug("Buffer overflow , must prepare the buffer again."
+ " outNetBuffer remaining: " + dst.remaining()
+ " outNetBuffer postion: " + dst.position()
+ " Packet buffer size: " + sslEngine.getSession().getPacketBufferSize()
+ " new buffer size: " + sslEngine.getSession().getPacketBufferSize() +
dst.position());
}
ByteBuffer newBuf =
channel.prepareAppDataBuffer(sslEngine.getSession().getPacketBufferSize() +
dst.position());
dst.flip();
newBuf.put(dst);
dst = newBuf;
if(logger.isLoggingEnabled(LogWriter.TRACE_DEBUG)) {
logger.logDebug(" new outNetBuffer remaining: " + dst.remaining()
+ " new outNetBuffer postion: " + dst.position());
}
continue;
}
Original comment by jean.deruelle
on 19 Jun 2015 at 2:58
https://telestax.atlassian.net/browse/JSIP-27 &
https://java.net/jira/browse/JSIP-502
Original comment by jean.deruelle
on 19 Jun 2015 at 3:00
This issue was updated by revision 5229e474fec7.
JSIP-502
Fix + Fix for JSIP-483
(cherry picked from commit 181e3ea87ca39cc9a840276e3beade7bc8055c84)
Original comment by jean.der...@telestax.com
on 19 Jun 2015 at 3:05
Original comment by jean.deruelle
on 19 Jun 2015 at 3:06
Original issue reported on code.google.com by
jean.deruelle
on 19 Jun 2015 at 2:57