Author: cmihail
Date: Thu Jun 23 07:57:59 2011
New Revision: 52432
URL:
http://svn.reactos.org/svn/reactos?rev=52432&view=rev
Log:
[TCPIP]
Backup commit
Modified:
branches/GSoC_2011/TcpIpDriver/drivers/CMakeLists.txt
branches/GSoC_2011/TcpIpDriver/lib/drivers/ip/transport/tcp/event.c
branches/GSoC_2011/TcpIpDriver/lib/drivers/ip/transport/tcp/tcp.c
branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/rostcp.c
Modified: branches/GSoC_2011/TcpIpDriver/drivers/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/TcpIpDriver/drivers/C…
==============================================================================
--- branches/GSoC_2011/TcpIpDriver/drivers/CMakeLists.txt [iso-8859-1] (original)
+++ branches/GSoC_2011/TcpIpDriver/drivers/CMakeLists.txt [iso-8859-1] Thu Jun 23 07:57:59
2011
@@ -14,4 +14,4 @@
add_subdirectory(usb)
add_subdirectory(video)
add_subdirectory(wdm)
-add_subdirectory(wmi)
+add_subdirectory(wmi)
Modified: branches/GSoC_2011/TcpIpDriver/lib/drivers/ip/transport/tcp/event.c
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/TcpIpDriver/lib/drive…
==============================================================================
--- branches/GSoC_2011/TcpIpDriver/lib/drivers/ip/transport/tcp/event.c [iso-8859-1]
(original)
+++ branches/GSoC_2011/TcpIpDriver/lib/drivers/ip/transport/tcp/event.c [iso-8859-1] Thu
Jun 23 07:57:59 2011
@@ -41,9 +41,9 @@
Complete(Bucket->Request.RequestContext, Bucket->Status,
Bucket->Information);
+ DereferenceObject(Bucket->AssociatedEndpoint);
+
ExFreePoolWithTag(Bucket, TDI_BUCKET_TAG);
-
- DereferenceObject(Bucket->AssociatedEndpoint);
}
static
Modified: branches/GSoC_2011/TcpIpDriver/lib/drivers/ip/transport/tcp/tcp.c
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/TcpIpDriver/lib/drive…
==============================================================================
--- branches/GSoC_2011/TcpIpDriver/lib/drivers/ip/transport/tcp/tcp.c [iso-8859-1]
(original)
+++ branches/GSoC_2011/TcpIpDriver/lib/drivers/ip/transport/tcp/tcp.c [iso-8859-1] Thu Jun
23 07:57:59 2011
@@ -302,6 +302,18 @@
if (NT_SUCCESS(Status))
{
connaddr.addr = RemoteAddress.Address.IPv4Address;
+
+ Bucket = ExAllocatePoolWithTag( NonPagedPool, sizeof(*Bucket), TDI_BUCKET_TAG );
+ if( !Bucket )
+ {
+ UnlockObject(Connection, OldIrql);
+ return STATUS_NO_MEMORY;
+ }
+
+ Bucket->Request.RequestNotifyObject = (PVOID)Complete;
+ Bucket->Request.RequestContext = Context;
+
+ InsertTailList( &Connection->ConnectRequest, &Bucket->Entry );
Status = TCPTranslateError(LibTCPConnect(Connection->SocketContext,
&connaddr,
@@ -311,7 +323,7 @@
if (Status == STATUS_PENDING)
{
- Bucket = ExAllocatePoolWithTag( NonPagedPool, sizeof(*Bucket), TDI_BUCKET_TAG
);
+ /*Bucket = ExAllocatePoolWithTag( NonPagedPool, sizeof(*Bucket),
TDI_BUCKET_TAG );
if( !Bucket )
{
UnlockObject(Connection, OldIrql);
@@ -321,7 +333,7 @@
Bucket->Request.RequestNotifyObject = (PVOID)Complete;
Bucket->Request.RequestContext = Context;
- InsertTailList( &Connection->ConnectRequest, &Bucket->Entry );
+ InsertTailList( &Connection->ConnectRequest, &Bucket->Entry
);*/
}
}
@@ -390,6 +402,9 @@
TI_DbgPrint(DEBUG_TCP,("[IP, TCPReceiveData] Called for %d bytes (on socket
%x)\n",
ReceiveLength, Connection->SocketContext));
+ DbgPrint("[IP, TCPReceiveData] Called for %d bytes (on
Connection->SocketContext = 0x%x)\n",
+ ReceiveLength, Connection->SocketContext);
+
LockObject(Connection, &OldIrql);
/* Freed in TCPSocketState */
@@ -412,6 +427,7 @@
UnlockObject(Connection, OldIrql);
TI_DbgPrint(DEBUG_TCP,("[IP, TCPReceiveData] Leaving. Status =
STATUS_PENDING\n"));
+ DbgPrint("[IP, TCPReceiveData] Leaving. Status = STATUS_PENDING\n");
return STATUS_PENDING;
}
@@ -437,6 +453,7 @@
TI_DbgPrint(DEBUG_TCP,("[IP, TCPSendData] Connection = %x\n",
Connection));
TI_DbgPrint(DEBUG_TCP,("[IP, TCPSendData] Connection->SocketContext =
%x\n",
Connection->SocketContext));
+ DbgPrint("[IP, TCPSendData] Called\n");
Status = TCPTranslateError(LibTCPSend(Connection->SocketContext,
BufferData,
@@ -475,6 +492,8 @@
UnlockObject(Connection, OldIrql);
TI_DbgPrint(DEBUG_TCP, ("[IP, TCPSendData] Leaving. Status = %x\n",
Status));
+
+ DbgPrint("[IP, TCPSendData] Leaving. Status = %x\n", Status);
return Status;
}
Modified: branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/rostcp.c
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/TcpIpDriver/lib/drive…
==============================================================================
--- branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/rostcp.c [iso-8859-1] (original)
+++ branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/rostcp.c [iso-8859-1] Thu Jun 23
07:57:59 2011
@@ -494,9 +494,10 @@
tcp_recv(msg->Pcb, InternalRecvEventHandler);
tcp_sent(msg->Pcb, InternalSendEventHandler);
- msg->Error = tcp_connect(msg->Pcb, msg->IpAddress, ntohs(msg->Port),
InternalConnectEventHandler);
- if (msg->Error == ERR_OK)
- msg->Error = ERR_INPROGRESS;
+ //if (msg->Error == ERR_OK)
+ // msg->Error = ERR_INPROGRESS;
+ err_t Error = tcp_connect(msg->Pcb, msg->IpAddress, ntohs(msg->Port),
InternalConnectEventHandler);
+ msg->Error = Error == ERR_OK ? ERR_INPROGRESS : Error;
KeSetEvent(&msg->Event, IO_NO_INCREMENT, FALSE);
@@ -527,8 +528,6 @@
if (WaitForEventSafely(&msg->Event))
{
ret = msg->Error;
- if (pcb->state != CLOSED && ret == ERR_INPROGRESS)
- ret = ERR_OK;
}
else
ret = ERR_CLSD;