We shouldn't try to unlock a no-longer-existing endpoint.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19425 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2006-12-04 17:28:14 +00:00
parent 03a536148f
commit 545be9ce4c
@@ -1166,42 +1166,42 @@ TCPEndpoint::_SendQueued(bool force)
/*static*/ void /*static*/ void
TCPEndpoint::_RetransmitTimer(net_timer *timer, void *data) TCPEndpoint::_RetransmitTimer(net_timer *timer, void *data)
{ {
TCPEndpoint *connection = (TCPEndpoint *)data; TCPEndpoint *endpoint = (TCPEndpoint *)data;
RecursiveLocker locker(connection->Lock()); RecursiveLocker locker(endpoint->Lock());
connection->fSendNext = connection->fSendUnacknowledged; endpoint->fSendNext = endpoint->fSendUnacknowledged;
connection->_SendQueued(); endpoint->_SendQueued();
connection->fSendNext = connection->fSendMax; endpoint->fSendNext = endpoint->fSendMax;
} }
/*static*/ void /*static*/ void
TCPEndpoint::_PersistTimer(net_timer *timer, void *data) TCPEndpoint::_PersistTimer(net_timer *timer, void *data)
{ {
TCPEndpoint *connection = (TCPEndpoint *)data; TCPEndpoint *endpoint = (TCPEndpoint *)data;
RecursiveLocker locker(connection->Lock()); RecursiveLocker locker(endpoint->Lock());
connection->_SendQueued(true); endpoint->_SendQueued(true);
} }
/*static*/ void /*static*/ void
TCPEndpoint::_DelayedAcknowledgeTimer(struct net_timer *timer, void *data) TCPEndpoint::_DelayedAcknowledgeTimer(struct net_timer *timer, void *data)
{ {
TCPEndpoint *connection = (TCPEndpoint *)data; TCPEndpoint *endpoint = (TCPEndpoint *)data;
RecursiveLocker locker(connection->Lock()); RecursiveLocker locker(endpoint->Lock());
connection->_SendQueued(true); endpoint->_SendQueued(true);
} }
/*static*/ void /*static*/ void
TCPEndpoint::_TimeWaitTimer(struct net_timer *timer, void *data) TCPEndpoint::_TimeWaitTimer(struct net_timer *timer, void *data)
{ {
TCPEndpoint *connection = (TCPEndpoint *)data; TCPEndpoint *endpoint = (TCPEndpoint *)data;
RecursiveLocker locker(connection->Lock()); recursive_lock_lock(&endpoint->Lock());
gSocketModule->delete_socket(connection->socket); gSocketModule->delete_socket(endpoint->socket);
} }