Author: cgutman Date: Fri Oct 17 05:42:44 2008 New Revision: 36787
URL: http://svn.reactos.org/svn/reactos?rev=36787&view=rev Log: - Merge aicom-network-fixes up to r36785
Modified: trunk/reactos/drivers/network/tcpip/tcpip/main.c trunk/reactos/lib/drivers/ip/transport/tcp/tcp.c
Modified: trunk/reactos/drivers/network/tcpip/tcpip/main.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/tcpip... ============================================================================== --- trunk/reactos/drivers/network/tcpip/tcpip/main.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/tcpip/tcpip/main.c [iso-8859-1] Fri Oct 17 05:42:44 2008 @@ -783,6 +783,7 @@ /* Initialize transport level protocol subsystems */ Status = RawIPStartup(); if( !NT_SUCCESS(Status) ) { + IPShutdown(); ChewShutdown(); IoDeleteDevice(IPDeviceObject); IoDeleteDevice(RawIPDeviceObject); @@ -791,12 +792,13 @@ ExFreePool(EntityList); NdisFreePacketPool(GlobalPacketPool); NdisFreeBufferPool(GlobalBufferPool); - IPShutdown(); return Status; }
Status = UDPStartup(); if( !NT_SUCCESS(Status) ) { + RawIPShutdown(); + IPShutdown(); ChewShutdown(); IoDeleteDevice(IPDeviceObject); IoDeleteDevice(RawIPDeviceObject); @@ -805,13 +807,14 @@ ExFreePool(EntityList); NdisFreePacketPool(GlobalPacketPool); NdisFreeBufferPool(GlobalBufferPool); - IPShutdown(); - RawIPShutdown(); return Status; }
Status = TCPStartup(); if( !NT_SUCCESS(Status) ) { + UDPShutdown(); + RawIPShutdown(); + IPShutdown(); ChewShutdown(); IoDeleteDevice(IPDeviceObject); IoDeleteDevice(RawIPDeviceObject); @@ -820,9 +823,6 @@ ExFreePool(EntityList); NdisFreePacketPool(GlobalPacketPool); NdisFreeBufferPool(GlobalBufferPool); - IPShutdown(); - RawIPShutdown(); - UDPShutdown(); return Status; }
@@ -842,6 +842,11 @@ NULL, 0, NULL); + LANShutdown(); + TCPShutdown(); + UDPShutdown(); + RawIPShutdown(); + IPShutdown(); ChewShutdown(); IoDeleteDevice(IPDeviceObject); IoDeleteDevice(RawIPDeviceObject); @@ -850,11 +855,6 @@ ExFreePool(EntityList); NdisFreePacketPool(GlobalPacketPool); NdisFreeBufferPool(GlobalBufferPool); - IPShutdown(); - RawIPShutdown(); - UDPShutdown(); - TCPShutdown(); - LANShutdown(); return Status; }
@@ -862,6 +862,11 @@ Status = LoopRegisterAdapter(NULL, NULL); if (!NT_SUCCESS(Status)) { TI_DbgPrint(MIN_TRACE, ("Failed to create loopback adapter. Status (0x%X).\n", Status)); + LANShutdown(); + TCPShutdown(); + UDPShutdown(); + RawIPShutdown(); + IPShutdown(); ChewShutdown(); IoDeleteDevice(IPDeviceObject); IoDeleteDevice(RawIPDeviceObject); @@ -870,11 +875,6 @@ ExFreePool(EntityList); NdisFreePacketPool(GlobalPacketPool); NdisFreeBufferPool(GlobalBufferPool); - IPShutdown(); - RawIPShutdown(); - UDPShutdown(); - TCPShutdown(); - LANShutdown(); LANUnregisterProtocol(); return Status; }
Modified: trunk/reactos/lib/drivers/ip/transport/tcp/tcp.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/transport/tc... ============================================================================== --- trunk/reactos/lib/drivers/ip/transport/tcp/tcp.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/ip/transport/tcp/tcp.c [iso-8859-1] Fri Oct 17 05:42:44 2008 @@ -406,10 +406,9 @@ Timeout.QuadPart = (LONGLONG) (Next - Current) * -1000000; /* 100 ms */ Status = KeWaitForSingleObject(&TimerLoopEvent, Executive, KernelMode, FALSE, &Timeout); - if (STATUS_SUCCESS == Status) { - PsTerminateSystemThread(STATUS_SUCCESS); + if (Status != STATUS_TIMEOUT) { + PsTerminateSystemThread(Status); } - ASSERT(STATUS_TIMEOUT == Status);
TcpipRecursiveMutexEnter( &TCPLock, TRUE ); TimerOskitTCP( Next == NextFast, Next == NextSlow );