Fixed a possible crashing bug.
Note, Andrew, if you want to store a route, it's *not* okay to keep it around all times. The net_route_info is thought for that as it allows the stack to switch to different routes (ie. if the interface has been changed, ...). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19049 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
3cdc3291b4
commit
ece28c9ef8
|
@ -615,6 +615,9 @@ TCPConnection::Send(uint16 flags, bool empty)
|
|||
{
|
||||
TRACE(("TCP:%p.Send(%X,%s)\n", this, flags, empty ? "1" : "0"));
|
||||
|
||||
if (fRoute == NULL)
|
||||
return B_ERROR;
|
||||
|
||||
net_buffer *buffer;
|
||||
uint32 effectiveWindow = min_c(tcp_get_mtu(this, (sockaddr *)&socket->address), fNextByteToWrite - fNextByteToSend);
|
||||
if (empty || effectiveWindow == 0 || fSendBuffer == NULL || fSendBuffer->size == 0) {
|
||||
|
|
Loading…
Reference in New Issue