[ros-diffs] [arty] 13732: Fixed more socket close problems. You
could get through TCPClose, unlock
arty at svn.reactos.com
arty at svn.reactos.com
Thu Feb 24 09:51:20 CET 2005
Fixed more socket close problems. You could get through TCPClose,
unlock
the socket, have somebody else service and even, and unlink the
connection
object at the same time. Now we hold the TCP lock while removing a
connection.
Modified: trunk/reactos/drivers/lib/ip/transport/tcp/event.c
Modified: trunk/reactos/drivers/net/tcpip/tcpip/fileobjs.c
_____
Modified: trunk/reactos/drivers/lib/ip/transport/tcp/event.c
--- trunk/reactos/drivers/lib/ip/transport/tcp/event.c 2005-02-23
23:37:06 UTC (rev 13731)
+++ trunk/reactos/drivers/lib/ip/transport/tcp/event.c 2005-02-24
08:51:18 UTC (rev 13732)
@@ -10,8 +10,6 @@
#include "precomp.h"
-extern VOID DrainSignals();
-
int TCPSocketState(void *ClientData,
void *WhichSocket,
void *WhichConnection,
@@ -32,10 +30,9 @@
if( !Connection ) {
TI_DbgPrint(DEBUG_TCP,("Socket closing.\n"));
Connection = FileFindConnectionByContext( WhichSocket );
- if( !Connection ) {
- TcpipRecursiveMutexLeave( &TCPLock );
+ if( !Connection )
return 0;
- } else
+ else
TI_DbgPrint(DEBUG_TCP,("Found socket %x\n", Connection));
}
_____
Modified: trunk/reactos/drivers/net/tcpip/tcpip/fileobjs.c
--- trunk/reactos/drivers/net/tcpip/tcpip/fileobjs.c 2005-02-23
23:37:06 UTC (rev 13731)
+++ trunk/reactos/drivers/net/tcpip/tcpip/fileobjs.c 2005-02-24
08:51:18 UTC (rev 13732)
@@ -471,8 +471,10 @@
Connection = Request->Handle.ConnectionContext;
+ TcpipRecursiveMutexEnter( &TCPLock, TRUE );
TCPClose(Connection);
DeleteConnectionEndpoint(Connection);
+ TcpipRecursiveMutexLeave( &TCPLock );
TI_DbgPrint(MAX_TRACE, ("Leaving.\n"));
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050224/433c1828/attachment.html
More information about the Ros-diffs
mailing list