[ros-diffs] [tkreuzer] 34870: tcpip: - fix some pointer to ULONG casts
tkreuzer at svn.reactos.org
tkreuzer at svn.reactos.org
Mon Jul 28 01:26:26 CEST 2008
- Previous message: [ros-diffs] [ros-arm-bringup] 34869: More over-engineering: there really isn't any reason to keep track of the "LowestAddress" of the process' addres space. At first sight, this looked like a dynamic value that would define the lowest address at which the process has allocated memory, but this isn't the case -- the variable actually defines the lowest valid address a process can allocate memory at. This is pretty much a static value, that was compute by MmInitializeProcessAddressSpace, to either MM_LOWEST_USER_ADDRESS or MmSystemRangeStart, based on whether or not the address space has an owner process (meaning it is a user-mode address space) or not (meaning it is a kernel mode address space). This patch removes that value and all the complex code around checking it, and replaces it with a much simpler design: if there is an owner process, use MM_LOWEST_USER_ADDRESS during gap calculations, otherwise, use MmSystemRangeStart. This is both faster, and wastes less space by not tracking static data.
- Next message: [ros-diffs] [tkreuzer] 34871: - fix bzip2 include to make ip compile - comment out some stuff in SEH asm code to make it compile, it's useless code anyway - add some hack exports to ntoskrnl - use private ntoskrnl rbuild File
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: tkreuzer
Date: Sun Jul 27 18:26:26 2008
New Revision: 34870
URL: http://svn.reactos.org/svn/reactos?rev=34870&view=rev
Log:
tcpip:
- fix some pointer to ULONG casts
Modified:
branches/ros-amd64-bringup/reactos/drivers/network/tcpip/tcpip/dispatch.c
Modified: branches/ros-amd64-bringup/reactos/drivers/network/tcpip/tcpip/dispatch.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drivers/network/tcpip/tcpip/dispatch.c?rev=34870&r1=34869&r2=34870&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/drivers/network/tcpip/tcpip/dispatch.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/drivers/network/tcpip/tcpip/dispatch.c [iso-8859-1] Sun Jul 27 18:26:26 2008
@@ -662,7 +662,7 @@
AddressInfo = (PTDI_ADDRESS_INFO)MmGetSystemAddressForMdl(Irp->MdlAddress);
- switch ((ULONG)IrpSp->FileObject->FsContext2) {
+ switch ((ULONG_PTR)IrpSp->FileObject->FsContext2) {
case TDI_TRANSPORT_ADDRESS_FILE:
AddrFile = (PADDRESS_FILE)TranContext->Handle.AddressHandle;
break;
@@ -713,7 +713,7 @@
AddressInfo = (PTDI_CONNECTION_INFORMATION)
MmGetSystemAddressForMdl(Irp->MdlAddress);
- switch ((ULONG)IrpSp->FileObject->FsContext2) {
+ switch ((ULONG_PTR)IrpSp->FileObject->FsContext2) {
case TDI_TRANSPORT_ADDRESS_FILE:
AddrFile = (PADDRESS_FILE)TranContext->Handle.AddressHandle;
break;
@@ -1007,12 +1007,16 @@
(*((PADDRESS_FILE)Request.Handle.AddressHandle)->Send)));
if( (*((PADDRESS_FILE)Request.Handle.AddressHandle)->Send) )
+ {
+ ULONG DataUsed = 0;
Status = (*((PADDRESS_FILE)Request.Handle.AddressHandle)->Send)(
Request.Handle.AddressHandle,
DgramInfo->SendDatagramInformation,
DataBuffer,
BufferSize,
- &Irp->IoStatus.Information);
+ &DataUsed);
+ Irp->IoStatus.Information = DataUsed;
+ }
else
Status = STATUS_UNSUCCESSFUL;
@@ -1279,7 +1283,7 @@
TranContext = (PTRANSPORT_CONTEXT)IrpSp->FileObject->FsContext;
- switch ((ULONG)IrpSp->FileObject->FsContext2) {
+ switch ((ULONG_PTR)IrpSp->FileObject->FsContext2) {
case TDI_TRANSPORT_ADDRESS_FILE:
Request.Handle.AddressHandle = TranContext->Handle.AddressHandle;
break;
@@ -1454,7 +1458,7 @@
TranContext = (PTRANSPORT_CONTEXT)IrpSp->FileObject->FsContext;
Info = (PTCP_REQUEST_SET_INFORMATION_EX)Irp->AssociatedIrp.SystemBuffer;
- switch ((ULONG)IrpSp->FileObject->FsContext2) {
+ switch ((ULONG_PTR)IrpSp->FileObject->FsContext2) {
case TDI_TRANSPORT_ADDRESS_FILE:
Request.Handle.AddressHandle = TranContext->Handle.AddressHandle;
break;
- Previous message: [ros-diffs] [ros-arm-bringup] 34869: More over-engineering: there really isn't any reason to keep track of the "LowestAddress" of the process' addres space. At first sight, this looked like a dynamic value that would define the lowest address at which the process has allocated memory, but this isn't the case -- the variable actually defines the lowest valid address a process can allocate memory at. This is pretty much a static value, that was compute by MmInitializeProcessAddressSpace, to either MM_LOWEST_USER_ADDRESS or MmSystemRangeStart, based on whether or not the address space has an owner process (meaning it is a user-mode address space) or not (meaning it is a kernel mode address space). This patch removes that value and all the complex code around checking it, and replaces it with a much simpler design: if there is an owner process, use MM_LOWEST_USER_ADDRESS during gap calculations, otherwise, use MmSystemRangeStart. This is both faster, and wastes less space by not tracking static data.
- Next message: [ros-diffs] [tkreuzer] 34871: - fix bzip2 include to make ip compile - comment out some stuff in SEH asm code to make it compile, it's useless code anyway - add some hack exports to ntoskrnl - use private ntoskrnl rbuild File
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Ros-diffs
mailing list