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:
parent
01a10fc527
commit
e2200e347d
@ -807,12 +807,8 @@ TCPEndpoint::_ListenReceive(tcp_segment_header &segment, net_buffer *buffer)
|
||||
if (gSocketModule->spawn_pending_socket(socket, &newSocket) < B_OK)
|
||||
return DROP;
|
||||
|
||||
TCPEndpoint *newEndpoint = (TCPEndpoint *)newSocket->first_protocol;
|
||||
|
||||
newEndpoint->LocalAddress().SetTo(&buffer->destination);
|
||||
newEndpoint->PeerAddress().SetTo(&buffer->source);
|
||||
|
||||
return newEndpoint->Spawn(this, segment, buffer);
|
||||
return ((TCPEndpoint *)newSocket->first_protocol)->Spawn(this,
|
||||
segment, buffer);
|
||||
}
|
||||
|
||||
|
||||
@ -822,10 +818,16 @@ TCPEndpoint::Spawn(TCPEndpoint *parent, tcp_segment_header &segment,
|
||||
{
|
||||
RecursiveLocker _(fLock);
|
||||
|
||||
// TODO error checking
|
||||
ProtocolSocket::Open();
|
||||
|
||||
fState = SYNCHRONIZE_RECEIVED;
|
||||
fManager = parent->fManager;
|
||||
fSpawned = true;
|
||||
|
||||
LocalAddress().SetTo(&buffer->destination);
|
||||
PeerAddress().SetTo(&buffer->source);
|
||||
|
||||
TRACE("Spawn()");
|
||||
|
||||
// TODO: proper error handling!
|
||||
|
Loading…
Reference in New Issue
Block a user