mirror of
https://github.com/reactos/reactos.git
synced 2024-08-12 14:16:30 +00:00
- Remove the rest of the code that sets the wrong IRP's status
svn path=/trunk/; revision=40357
This commit is contained in:
parent
36f48eb147
commit
8f9cc82b53
|
@ -84,11 +84,8 @@ static NTSTATUS NTAPI StreamSocketConnectComplete
|
||||||
|
|
||||||
/* I was wrong about this before as we can have pending writes to a not
|
/* I was wrong about this before as we can have pending writes to a not
|
||||||
* yet connected socket */
|
* yet connected socket */
|
||||||
if( !SocketAcquireStateLock( FCB ) ) {
|
if( !SocketAcquireStateLock( FCB ) )
|
||||||
Irp->IoStatus.Status = STATUS_FILE_CLOSED;
|
|
||||||
Irp->IoStatus.Information = 0;
|
|
||||||
return STATUS_FILE_CLOSED;
|
return STATUS_FILE_CLOSED;
|
||||||
}
|
|
||||||
|
|
||||||
AFD_DbgPrint(MID_TRACE,("Irp->IoStatus.Status = %x\n",
|
AFD_DbgPrint(MID_TRACE,("Irp->IoStatus.Status = %x\n",
|
||||||
Irp->IoStatus.Status));
|
Irp->IoStatus.Status));
|
||||||
|
@ -136,8 +133,6 @@ static NTSTATUS NTAPI StreamSocketConnectComplete
|
||||||
Status = MakeSocketIntoConnection( FCB );
|
Status = MakeSocketIntoConnection( FCB );
|
||||||
|
|
||||||
if( !NT_SUCCESS(Status) ) {
|
if( !NT_SUCCESS(Status) ) {
|
||||||
Irp->IoStatus.Status = Status;
|
|
||||||
Irp->IoStatus.Information = 0;
|
|
||||||
SocketStateUnlock( FCB );
|
SocketStateUnlock( FCB );
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
@ -158,12 +153,6 @@ static NTSTATUS NTAPI StreamSocketConnectComplete
|
||||||
Status = STATUS_SUCCESS;
|
Status = STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
|
||||||
{
|
|
||||||
Irp->IoStatus.Status = Status;
|
|
||||||
Irp->IoStatus.Information = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
SocketStateUnlock( FCB );
|
SocketStateUnlock( FCB );
|
||||||
|
|
||||||
AFD_DbgPrint(MID_TRACE,("Returning %x\n", Status));
|
AFD_DbgPrint(MID_TRACE,("Returning %x\n", Status));
|
||||||
|
|
|
@ -98,11 +98,8 @@ static NTSTATUS NTAPI ListenComplete
|
||||||
PLIST_ENTRY NextIrpEntry, QeltEntry;
|
PLIST_ENTRY NextIrpEntry, QeltEntry;
|
||||||
PIRP NextIrp;
|
PIRP NextIrp;
|
||||||
|
|
||||||
if( !SocketAcquireStateLock( FCB ) ) {
|
if( !SocketAcquireStateLock( FCB ) )
|
||||||
Irp->IoStatus.Status = STATUS_FILE_CLOSED;
|
|
||||||
Irp->IoStatus.Information = 0;
|
|
||||||
return STATUS_FILE_CLOSED;
|
return STATUS_FILE_CLOSED;
|
||||||
}
|
|
||||||
|
|
||||||
FCB->ListenIrp.InFlightRequest = NULL;
|
FCB->ListenIrp.InFlightRequest = NULL;
|
||||||
|
|
||||||
|
|
|
@ -260,8 +260,6 @@ NTSTATUS NTAPI ReceiveComplete
|
||||||
return STATUS_FILE_CLOSED;
|
return STATUS_FILE_CLOSED;
|
||||||
} else if( FCB->State == SOCKET_STATE_LISTENING ) {
|
} else if( FCB->State == SOCKET_STATE_LISTENING ) {
|
||||||
AFD_DbgPrint(MIN_TRACE,("!!! LISTENER GOT A RECEIVE COMPLETE !!!\n"));
|
AFD_DbgPrint(MIN_TRACE,("!!! LISTENER GOT A RECEIVE COMPLETE !!!\n"));
|
||||||
Irp->IoStatus.Status = STATUS_INVALID_PARAMETER;
|
|
||||||
Irp->IoStatus.Information = 0;
|
|
||||||
SocketStateUnlock( FCB );
|
SocketStateUnlock( FCB );
|
||||||
return STATUS_INVALID_PARAMETER;
|
return STATUS_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
@ -464,11 +462,8 @@ PacketSocketRecvComplete(
|
||||||
|
|
||||||
AFD_DbgPrint(MID_TRACE,("Called on %x\n", FCB));
|
AFD_DbgPrint(MID_TRACE,("Called on %x\n", FCB));
|
||||||
|
|
||||||
if( !SocketAcquireStateLock( FCB ) ) {
|
if( !SocketAcquireStateLock( FCB ) )
|
||||||
Irp->IoStatus.Status = STATUS_FILE_CLOSED;
|
|
||||||
Irp->IoStatus.Information = 0;
|
|
||||||
return STATUS_FILE_CLOSED;
|
return STATUS_FILE_CLOSED;
|
||||||
}
|
|
||||||
|
|
||||||
FCB->ReceiveIrp.InFlightRequest = NULL;
|
FCB->ReceiveIrp.InFlightRequest = NULL;
|
||||||
|
|
||||||
|
@ -514,8 +509,6 @@ PacketSocketRecvComplete(
|
||||||
} else Status = STATUS_NO_MEMORY;
|
} else Status = STATUS_NO_MEMORY;
|
||||||
|
|
||||||
if( !NT_SUCCESS( Status ) ) {
|
if( !NT_SUCCESS( Status ) ) {
|
||||||
Irp->IoStatus.Status = Status;
|
|
||||||
Irp->IoStatus.Information = 0;
|
|
||||||
if( DatagramRecv ) ExFreePool( DatagramRecv );
|
if( DatagramRecv ) ExFreePool( DatagramRecv );
|
||||||
SocketStateUnlock( FCB );
|
SocketStateUnlock( FCB );
|
||||||
return Status;
|
return Status;
|
||||||
|
|
|
@ -40,9 +40,8 @@ static NTSTATUS NTAPI SendComplete
|
||||||
|
|
||||||
ASSERT_IRQL(APC_LEVEL);
|
ASSERT_IRQL(APC_LEVEL);
|
||||||
|
|
||||||
if( !SocketAcquireStateLock( FCB ) ) {
|
if( !SocketAcquireStateLock( FCB ) )
|
||||||
return STATUS_FILE_CLOSED;
|
return STATUS_FILE_CLOSED;
|
||||||
}
|
|
||||||
|
|
||||||
FCB->SendIrp.InFlightRequest = NULL;
|
FCB->SendIrp.InFlightRequest = NULL;
|
||||||
/* Request is not in flight any longer */
|
/* Request is not in flight any longer */
|
||||||
|
@ -179,9 +178,8 @@ static NTSTATUS NTAPI PacketSocketSendComplete
|
||||||
Irp->IoStatus.Status,
|
Irp->IoStatus.Status,
|
||||||
Irp->IoStatus.Information));
|
Irp->IoStatus.Information));
|
||||||
|
|
||||||
if( !SocketAcquireStateLock( FCB ) ) {
|
if( !SocketAcquireStateLock( FCB ) )
|
||||||
return STATUS_FILE_CLOSED;
|
return STATUS_FILE_CLOSED;
|
||||||
}
|
|
||||||
|
|
||||||
FCB->SendIrp.InFlightRequest = NULL;
|
FCB->SendIrp.InFlightRequest = NULL;
|
||||||
/* Request is not in flight any longer */
|
/* Request is not in flight any longer */
|
||||||
|
|
Loading…
Reference in a new issue