Sync to trunk head (r42241)
[reactos.git] / reactos / drivers / network / tcpip / tcpip / dispatch.c
index 9791c3f..304657b 100644 (file)
@@ -685,7 +685,7 @@ NTSTATUS DispTdiQueryInformation(
         AddressInfo = (PTDI_ADDRESS_INFO)MmGetSystemAddressForMdl(Irp->MdlAddress);
                Address = (PTA_IP_ADDRESS)&AddressInfo->Address;
 
-        switch ((ULONG)IrpSp->FileObject->FsContext2) {
+        switch ((ULONG_PTR)IrpSp->FileObject->FsContext2) {
           case TDI_TRANSPORT_ADDRESS_FILE:
             AddrFile = (PADDRESS_FILE)TranContext->Handle.AddressHandle;
 
@@ -744,7 +744,7 @@ NTSTATUS DispTdiQueryInformation(
         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;
@@ -1061,12 +1061,16 @@ NTSTATUS DispTdiSendDatagram(
                     (*((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;
     }
@@ -1333,7 +1337,7 @@ NTSTATUS DispTdiQueryInformationEx(
 
     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;
@@ -1508,7 +1512,7 @@ NTSTATUS DispTdiSetInformationEx(
     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;