call ProtocolSocket::Open() for accept()ed sockets. This fixes a regression introduced earlier today.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20863 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -807,12 +807,8 @@ TCPEndpoint::_ListenReceive(tcp_segment_header &segment, net_buffer *buffer)
|
|||||||
if (gSocketModule->spawn_pending_socket(socket, &newSocket) < B_OK)
|
if (gSocketModule->spawn_pending_socket(socket, &newSocket) < B_OK)
|
||||||
return DROP;
|
return DROP;
|
||||||
|
|
||||||
TCPEndpoint *newEndpoint = (TCPEndpoint *)newSocket->first_protocol;
|
return ((TCPEndpoint *)newSocket->first_protocol)->Spawn(this,
|
||||||
|
segment, buffer);
|
||||||
newEndpoint->LocalAddress().SetTo(&buffer->destination);
|
|
||||||
newEndpoint->PeerAddress().SetTo(&buffer->source);
|
|
||||||
|
|
||||||
return newEndpoint->Spawn(this, segment, buffer);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -822,10 +818,16 @@ TCPEndpoint::Spawn(TCPEndpoint *parent, tcp_segment_header &segment,
|
|||||||
{
|
{
|
||||||
RecursiveLocker _(fLock);
|
RecursiveLocker _(fLock);
|
||||||
|
|
||||||
|
// TODO error checking
|
||||||
|
ProtocolSocket::Open();
|
||||||
|
|
||||||
fState = SYNCHRONIZE_RECEIVED;
|
fState = SYNCHRONIZE_RECEIVED;
|
||||||
fManager = parent->fManager;
|
fManager = parent->fManager;
|
||||||
fSpawned = true;
|
fSpawned = true;
|
||||||
|
|
||||||
|
LocalAddress().SetTo(&buffer->destination);
|
||||||
|
PeerAddress().SetTo(&buffer->source);
|
||||||
|
|
||||||
TRACE("Spawn()");
|
TRACE("Spawn()");
|
||||||
|
|
||||||
// TODO: proper error handling!
|
// TODO: proper error handling!
|
||||||
|
|||||||
Reference in New Issue
Block a user