Author: cgutman
Date: Sat Mar 28 18:49:29 2009
New Revision: 40267
URL:
http://svn.reactos.org/svn/reactos?rev=40267&view=rev
Log:
- Remove a useless parameter from UnlockAndMaybeComplete
- Fix a few listening bugs
Modified:
trunk/reactos/drivers/network/afd/afd/bind.c
trunk/reactos/drivers/network/afd/afd/connect.c
trunk/reactos/drivers/network/afd/afd/context.c
trunk/reactos/drivers/network/afd/afd/info.c
trunk/reactos/drivers/network/afd/afd/listen.c
trunk/reactos/drivers/network/afd/afd/lock.c
trunk/reactos/drivers/network/afd/afd/main.c
trunk/reactos/drivers/network/afd/afd/read.c
trunk/reactos/drivers/network/afd/afd/select.c
trunk/reactos/drivers/network/afd/afd/write.c
trunk/reactos/drivers/network/afd/include/afd.h
Modified: trunk/reactos/drivers/network/afd/afd/bind.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/bi…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/bind.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/bind.c [iso-8859-1] Sat Mar 28 18:49:29 2009
@@ -56,7 +56,7 @@
if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp );
if( !(BindReq = LockRequest( Irp, IrpSp )) )
return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY,
- Irp, 0, NULL );
+ Irp, 0 );
if( FCB->LocalAddress ) ExFreePool( FCB->LocalAddress );
FCB->LocalAddress = TaCopyTransportAddress( &BindReq->Address );
@@ -67,7 +67,7 @@
if( NT_SUCCESS(Status) )
FCB->State = SOCKET_STATE_BOUND;
- else return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL );
+ else return UnlockAndMaybeComplete( FCB, Status, Irp, 0 );
AFD_DbgPrint(MID_TRACE,("FCB->Flags %x\n", FCB->Flags));
@@ -76,7 +76,7 @@
TdiBuildConnectionInfo( &FCB->AddressFrom,
FCB->LocalAddress );
- if( !FCB->AddressFrom ) return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, 0,
NULL );
+ if( !FCB->AddressFrom ) return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, 0
);
AFD_DbgPrint(MID_TRACE,("Calling TdiReceiveDatagram\n"));
@@ -95,6 +95,6 @@
if( Status == STATUS_PENDING ) Status = STATUS_SUCCESS;
}
- return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL );
+ return UnlockAndMaybeComplete( FCB, Status, Irp, 0 );
}
Modified: trunk/reactos/drivers/network/afd/afd/connect.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/co…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/connect.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/connect.c [iso-8859-1] Sat Mar 28 18:49:29 2009
@@ -179,7 +179,7 @@
if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp );
if( !(ConnectReq = LockRequest( Irp, IrpSp )) )
return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp,
- 0, NULL );
+ 0 );
AFD_DbgPrint(MID_TRACE,("Connect request:\n"));
#if 0
@@ -207,10 +207,10 @@
if( NT_SUCCESS(Status) )
FCB->State = SOCKET_STATE_BOUND;
else
- return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL );
+ return UnlockAndMaybeComplete( FCB, Status, Irp, 0 );
} else
return UnlockAndMaybeComplete
- ( FCB, STATUS_NO_MEMORY, Irp, 0, NULL );
+ ( FCB, STATUS_NO_MEMORY, Irp, 0 );
/* Drop through to SOCKET_STATE_BOUND */
@@ -264,5 +264,5 @@
break;
}
- return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL );
-}
+ return UnlockAndMaybeComplete( FCB, Status, Irp, 0 );
+}
Modified: trunk/reactos/drivers/network/afd/afd/context.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/co…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/context.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/context.c [iso-8859-1] Sat Mar 28 18:49:29 2009
@@ -33,7 +33,7 @@
AFD_DbgPrint(MID_TRACE,("Returning %x\n", Status));
- return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL );
+ return UnlockAndMaybeComplete( FCB, Status, Irp, 0 );
}
NTSTATUS NTAPI
@@ -52,7 +52,7 @@
FCB->Context = ExAllocatePool( PagedPool,
IrpSp->Parameters.DeviceIoControl.InputBufferLength );
- if( !FCB->Context ) return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, 0,
NULL );
+ if( !FCB->Context ) return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, 0
);
FCB->ContextSize = IrpSp->Parameters.DeviceIoControl.InputBufferLength;
@@ -60,5 +60,5 @@
IrpSp->Parameters.DeviceIoControl.Type3InputBuffer,
FCB->ContextSize );
- return UnlockAndMaybeComplete( FCB, STATUS_SUCCESS, Irp, 0, NULL );
+ return UnlockAndMaybeComplete( FCB, STATUS_SUCCESS, Irp, 0 );
}
Modified: trunk/reactos/drivers/network/afd/afd/info.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/in…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/info.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/info.c [iso-8859-1] Sat Mar 28 18:49:29 2009
@@ -66,7 +66,7 @@
AFD_DbgPrint(MID_TRACE,("Returning %x\n", Status));
- return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL );
+ return UnlockAndMaybeComplete( FCB, Status, Irp, 0 );
}
NTSTATUS NTAPI
@@ -80,8 +80,7 @@
if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp );
if( FCB->AddressFile.Object == NULL && FCB->Connection.Object == NULL )
{
- return UnlockAndMaybeComplete( FCB, STATUS_INVALID_PARAMETER, Irp, 0,
- NULL );
+ return UnlockAndMaybeComplete( FCB, STATUS_INVALID_PARAMETER, Irp, 0 );
}
Mdl = IoAllocateMdl
@@ -108,7 +107,7 @@
} else
Status = STATUS_INSUFFICIENT_RESOURCES;
- return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL );
+ return UnlockAndMaybeComplete( FCB, Status, Irp, 0 );
}
NTSTATUS NTAPI
@@ -124,7 +123,7 @@
if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp );
if (FCB->RemoteAddress == NULL || FCB->Connection.Object == NULL) {
- return UnlockAndMaybeComplete( FCB, STATUS_INVALID_PARAMETER, Irp, 0, NULL );
+ return UnlockAndMaybeComplete( FCB, STATUS_INVALID_PARAMETER, Irp, 0 );
}
if(NT_SUCCESS(Status = TdiBuildNullConnectionInfo
@@ -164,5 +163,5 @@
ExFreePool(ConnInfo);
}
- return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL );
+ return UnlockAndMaybeComplete( FCB, Status, Irp, 0 );
}
Modified: trunk/reactos/drivers/network/afd/afd/listen.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/li…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/listen.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/listen.c [iso-8859-1] Sat Mar 28 18:49:29 2009
@@ -41,15 +41,7 @@
PollReeval( DeviceExt, NewFileObject );
}
- if( Irp->MdlAddress ) UnlockRequest( Irp, IoGetCurrentIrpStackLocation( Irp ) );
-
- Irp->IoStatus.Information = 0;
- Irp->IoStatus.Status = Status;
- IoCompleteRequest( Irp, IO_NETWORK_INCREMENT );
-
- SocketStateUnlock( FCB );
-
- return Status;
+ return UnlockAndMaybeComplete( FCB, Status, Irp, 0 );
}
static NTSTATUS SatisfyPreAccept( PIRP Irp, PAFD_TDI_OBJECT_QELT Qelt ) {
@@ -197,12 +189,12 @@
if( !(ListenReq = LockRequest( Irp, IrpSp )) )
return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp,
- 0, NULL );
+ 0 );
if( FCB->State != SOCKET_STATE_BOUND ) {
Status = STATUS_INVALID_PARAMETER;
AFD_DbgPrint(MID_TRACE,("Could not listen an unbound socket\n"));
- return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL );
+ return UnlockAndMaybeComplete( FCB, Status, Irp, 0 );
}
FCB->DelayedAccept = ListenReq->UseDelayedAcceptance;
@@ -213,7 +205,7 @@
AFD_DbgPrint(MID_TRACE,("Status from warmsocket %x\n", Status));
- if( !NT_SUCCESS(Status) ) return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL
);
+ if( !NT_SUCCESS(Status) ) return UnlockAndMaybeComplete( FCB, Status, Irp, 0 );
TdiBuildNullConnectionInfo
( &FCB->ListenIrp.ConnectionCallInfo,
@@ -223,7 +215,7 @@
FCB->LocalAddress->Address[0].AddressType );
if( !FCB->ListenIrp.ConnectionReturnInfo || !FCB->ListenIrp.ConnectionCallInfo
)
- return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, 0, NULL );
+ return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, 0 );
FCB->State = SOCKET_STATE_LISTENING;
@@ -235,11 +227,11 @@
ListenComplete,
FCB );
- if( NT_SUCCESS(Status) || Status == STATUS_PENDING )
+ if( Status == STATUS_PENDING )
Status = STATUS_SUCCESS;
AFD_DbgPrint(MID_TRACE,("Returning %x\n", Status));
- return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL );
+ return UnlockAndMaybeComplete( FCB, Status, Irp, 0 );
}
NTSTATUS AfdWaitForListen( PDEVICE_OBJECT DeviceObject, PIRP Irp,
@@ -298,11 +290,15 @@
Status = WarmSocketForConnection( FCB );
if( Status == STATUS_SUCCESS ) {
- TdiBuildNullConnectionInfo
- ( &FCB->ListenIrp.ConnectionReturnInfo,
- FCB->LocalAddress->Address[0].AddressType );
-
- if( !FCB->ListenIrp.ConnectionReturnInfo ) return UnlockAndMaybeComplete( FCB,
STATUS_NO_MEMORY, Irp, 0, NULL );
+ TdiBuildNullConnectionInfo
+ ( &FCB->ListenIrp.ConnectionCallInfo,
+ FCB->LocalAddress->Address[0].AddressType );
+ TdiBuildNullConnectionInfo
+ ( &FCB->ListenIrp.ConnectionReturnInfo,
+ FCB->LocalAddress->Address[0].AddressType );
+
+ if( !FCB->ListenIrp.ConnectionReturnInfo ||
!FCB->ListenIrp.ConnectionCallInfo )
+ return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, 0 );
Status = TdiListen( &FCB->ListenIrp.InFlightRequest,
FCB->Connection.Object,
@@ -311,8 +307,15 @@
&FCB->ListenIrp.Iosb,
ListenComplete,
FCB );
- } else return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL );
- FCB->NeedsNewListen = FALSE;
+
+ if( Status == STATUS_PENDING )
+ Status = STATUS_SUCCESS;
+
+ if( !NT_SUCCESS(Status) )
+ return UnlockAndMaybeComplete( FCB, Status, Irp, 0 );
+
+ FCB->NeedsNewListen = FALSE;
+ } else return UnlockAndMaybeComplete( FCB, Status, Irp, 0 );
}
for( PendingConn = FCB->PendingConnections.Flink;
@@ -338,7 +341,7 @@
(PVOID *)&NewFileObject,
NULL );
- if( !NT_SUCCESS(Status) ) UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL
);
+ if( !NT_SUCCESS(Status) ) UnlockAndMaybeComplete( FCB, Status, Irp, 0 );
ASSERT(NewFileObject != FileObject);
ASSERT(NewFileObject->FsContext != FCB);
@@ -362,5 +365,5 @@
}
}
- return UnlockAndMaybeComplete( FCB, STATUS_UNSUCCESSFUL, Irp, 0, NULL );
-}
+ return UnlockAndMaybeComplete( FCB, STATUS_UNSUCCESSFUL, Irp, 0 );
+}
Modified: trunk/reactos/drivers/network/afd/afd/lock.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/lo…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/lock.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/lock.c [iso-8859-1] Sat Mar 28 18:49:29 2009
@@ -285,8 +285,7 @@
NTSTATUS NTAPI UnlockAndMaybeComplete
( PAFD_FCB FCB, NTSTATUS Status, PIRP Irp,
- UINT Information,
- PIO_COMPLETION_ROUTINE Completion ) {
+ UINT Information ) {
Irp->IoStatus.Status = Status;
Irp->IoStatus.Information = Information;
@@ -300,8 +299,6 @@
} else {
if ( Irp->MdlAddress ) UnlockRequest( Irp, IoGetCurrentIrpStackLocation( Irp ) );
SocketStateUnlock( FCB );
- if( Completion )
- Completion( FCB->DeviceExt->DeviceObject, Irp, FCB );
IoCompleteRequest( Irp, IO_NETWORK_INCREMENT );
}
return Status;
@@ -323,5 +320,5 @@
&Irp->Tail.Overlay.ListEntry );
IoMarkIrpPending(Irp);
Irp->IoStatus.Status = STATUS_PENDING;
- return UnlockAndMaybeComplete( FCB, STATUS_PENDING, Irp, 0, NULL );
-}
+ return UnlockAndMaybeComplete( FCB, STATUS_PENDING, Irp, 0 );
+}
Modified: trunk/reactos/drivers/network/afd/afd/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/ma…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/main.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/main.c [iso-8859-1] Sat Mar 28 18:49:29 2009
@@ -270,7 +270,7 @@
if( !(DisReq = LockRequest( Irp, IrpSp )) )
return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY,
- Irp, 0, NULL );
+ Irp, 0 );
if (NULL == FCB->RemoteAddress)
{
@@ -283,7 +283,7 @@
if( !NT_SUCCESS(Status) || !ConnInfo )
return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY,
- Irp, 0, NULL );
+ Irp, 0 );
}
if( DisReq->DisconnectType & AFD_DISCONNECT_SEND )
@@ -303,7 +303,7 @@
if (ConnInfo) ExFreePool( ConnInfo );
- return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL );
+ return UnlockAndMaybeComplete( FCB, Status, Irp, 0 );
}
static NTSTATUS NTAPI
Modified: trunk/reactos/drivers/network/afd/afd/read.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/re…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/read.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/read.c [iso-8859-1] Sat Mar 28 18:49:29 2009
@@ -284,14 +284,14 @@
AFD_DbgPrint(MID_TRACE,("Called recv on wrong kind of socket (s%x)\n",
FCB->State));
return UnlockAndMaybeComplete( FCB, STATUS_INVALID_PARAMETER,
- Irp, 0, NULL );
+ Irp, 0 );
}
if( FCB->Flags & AFD_ENDPOINT_CONNECTIONLESS )
{
AFD_DbgPrint(MID_TRACE,("Receive on connection-less sockets not
implemented\n"));
return UnlockAndMaybeComplete( FCB, STATUS_NOT_IMPLEMENTED,
- Irp, 0, NULL );
+ Irp, 0 );
}
FCB->EventsFired &= ~AFD_EVENT_RECEIVE;
@@ -299,7 +299,7 @@
if( !(RecvReq = LockRequest( Irp, IrpSp )) )
return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY,
- Irp, 0, NULL );
+ Irp, 0 );
AFD_DbgPrint(MID_TRACE,("Recv flags %x\n", RecvReq->AfdFlags));
@@ -310,7 +310,7 @@
if( !RecvReq->BufferArray ) {
return UnlockAndMaybeComplete( FCB, STATUS_ACCESS_VIOLATION,
- Irp, 0, NULL );
+ Irp, 0 );
}
Irp->IoStatus.Status = STATUS_PENDING;
@@ -330,7 +330,7 @@
RemoveEntryList( &Irp->Tail.Overlay.ListEntry );
UnlockBuffers( RecvReq->BufferArray, RecvReq->BufferCount, FALSE );
return UnlockAndMaybeComplete( FCB, Status, Irp,
- TotalBytesCopied, NULL );
+ TotalBytesCopied );
} else if( Status == STATUS_PENDING ) {
AFD_DbgPrint(MID_TRACE,("Leaving read irp\n"));
IoMarkIrpPending( Irp );
@@ -576,10 +576,10 @@
/* Check that the socket is bound */
if( FCB->State != SOCKET_STATE_BOUND )
return UnlockAndMaybeComplete
- ( FCB, STATUS_INVALID_PARAMETER, Irp, 0, NULL );
+ ( FCB, STATUS_INVALID_PARAMETER, Irp, 0 );
if( !(RecvReq = LockRequest( Irp, IrpSp )) )
return UnlockAndMaybeComplete
- ( FCB, STATUS_NO_MEMORY, Irp, 0, NULL );
+ ( FCB, STATUS_NO_MEMORY, Irp, 0 );
AFD_DbgPrint(MID_TRACE,("Recv flags %x\n", RecvReq->AfdFlags));
@@ -591,7 +591,7 @@
if( !RecvReq->BufferArray ) { /* access violation in userspace */
return UnlockAndMaybeComplete
- ( FCB, STATUS_ACCESS_VIOLATION, Irp, 0, NULL );
+ ( FCB, STATUS_ACCESS_VIOLATION, Irp, 0 );
}
if( !IsListEmpty( &FCB->DatagramList ) ) {
@@ -615,7 +615,7 @@
UnlockBuffers( RecvReq->BufferArray, RecvReq->BufferCount, TRUE );
return UnlockAndMaybeComplete
- ( FCB, Status, Irp, Irp->IoStatus.Information, NULL );
+ ( FCB, Status, Irp, Irp->IoStatus.Information );
} else {
Status = SatisfyPacketRecvRequest
( FCB, Irp, DatagramRecv,
@@ -631,14 +631,14 @@
UnlockBuffers( RecvReq->BufferArray, RecvReq->BufferCount, TRUE );
return UnlockAndMaybeComplete
- ( FCB, Status, Irp, Irp->IoStatus.Information, NULL );
+ ( FCB, Status, Irp, Irp->IoStatus.Information );
}
} else if( RecvReq->AfdFlags & AFD_IMMEDIATE ) {
AFD_DbgPrint(MID_TRACE,("Nonblocking\n"));
Status = STATUS_CANT_WAIT;
PollReeval( FCB->DeviceExt, FCB->FileObject );
UnlockBuffers( RecvReq->BufferArray, RecvReq->BufferCount, TRUE );
- return UnlockAndMaybeComplete( FCB, Status, Irp, 0, NULL );
+ return UnlockAndMaybeComplete( FCB, Status, Irp, 0 );
} else {
PollReeval( FCB->DeviceExt, FCB->FileObject );
return LeaveIrpUntilLater( FCB, Irp, FUNCTION_RECV );
Modified: trunk/reactos/drivers/network/afd/afd/select.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/se…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/select.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/select.c [iso-8859-1] Sat Mar 28 18:49:29 2009
@@ -281,7 +281,7 @@
if ( !EventSelectInfo ) {
return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp,
- 0, NULL );
+ 0 );
}
AFD_DbgPrint(MID_TRACE,("Called (Event %x Triggers %x)\n",
EventSelectInfo->EventObject,
@@ -310,7 +310,7 @@
AFD_DbgPrint(MID_TRACE,("Returning %x\n", Status));
return UnlockAndMaybeComplete( FCB, Status, Irp,
- 0, NULL );
+ 0 );
}
NTSTATUS NTAPI
@@ -329,14 +329,14 @@
if ( !EnumReq ) {
return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp,
- 0, NULL );
+ 0 );
}
EnumReq->PollEvents = FCB->PollState;
RtlZeroMemory( EnumReq->EventStatus, sizeof(EnumReq->EventStatus) );
return UnlockAndMaybeComplete( FCB, STATUS_SUCCESS, Irp,
- 0, NULL );
+ 0 );
}
/* * * NOTE ALWAYS CALLED AT DISPATCH_LEVEL * * */
Modified: trunk/reactos/drivers/network/afd/afd/write.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/wr…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/write.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/write.c [iso-8859-1] Sat Mar 28 18:49:29 2009
@@ -148,8 +148,7 @@
AFD_DbgPrint(MID_TRACE,("Dismissing request: %x\n", Status));
- return UnlockAndMaybeComplete( FCB, Status, NextIrp, TotalBytesCopied,
- NULL );
+ return UnlockAndMaybeComplete( FCB, Status, NextIrp, TotalBytesCopied );
} else if( NextIrp ) {
AFD_DbgPrint(MID_TRACE,("Could not do any more with Irp %x\n",
NextIrp));
@@ -220,11 +219,10 @@
/* Check that the socket is bound */
if( FCB->State != SOCKET_STATE_BOUND )
return UnlockAndMaybeComplete( FCB, STATUS_INVALID_PARAMETER, Irp,
- 0, NULL );
+ 0 );
if( !(SendReq = LockRequest( Irp, IrpSp )) )
- return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, 0,
- NULL );
+ return UnlockAndMaybeComplete( FCB, STATUS_NO_MEMORY, Irp, 0 );
/* Must lock buffers before handing off user data */
SendReq->BufferArray = LockBuffers( SendReq->BufferArray,
@@ -234,7 +232,7 @@
if( !SendReq->BufferArray ) {
return UnlockAndMaybeComplete( FCB, STATUS_ACCESS_VIOLATION,
- Irp, 0, NULL );
+ Irp, 0 );
}
TdiBuildConnectionInfo( &TargetAddress, FCB->RemoteAddress );
@@ -258,13 +256,12 @@
AFD_DbgPrint(MID_TRACE,("Dismissing request: %x\n", Status));
return UnlockAndMaybeComplete( FCB, Status, Irp,
- SendReq->BufferArray[0].len,
- NULL );
+ SendReq->BufferArray[0].len );
}
if( !(SendReq = LockRequest( Irp, IrpSp )) )
return UnlockAndMaybeComplete
- ( FCB, STATUS_NO_MEMORY, Irp, TotalBytesCopied, NULL );
+ ( FCB, STATUS_NO_MEMORY, Irp, TotalBytesCopied );
SendReq->BufferArray = LockBuffers( SendReq->BufferArray,
SendReq->BufferCount,
@@ -273,7 +270,7 @@
if( !SendReq->BufferArray ) {
return UnlockAndMaybeComplete( FCB, STATUS_ACCESS_VIOLATION,
- Irp, 0, NULL );
+ Irp, 0 );
}
AFD_DbgPrint(MID_TRACE,("Socket state %d\n", FCB->State));
@@ -283,7 +280,7 @@
AFD_DbgPrint(MID_TRACE,("Nonblocking\n"));
UnlockBuffers( SendReq->BufferArray, SendReq->BufferCount, FALSE );
return UnlockAndMaybeComplete
- ( FCB, STATUS_CANT_WAIT, Irp, 0, NULL );
+ ( FCB, STATUS_CANT_WAIT, Irp, 0 );
} else {
AFD_DbgPrint(MID_TRACE,("Queuing request\n"));
return LeaveIrpUntilLater( FCB, Irp, FUNCTION_SEND );
@@ -326,7 +323,7 @@
AFD_DbgPrint(MID_TRACE,("Empty send\n"));
return UnlockAndMaybeComplete
- ( FCB, Status, Irp, TotalBytesCopied, NULL );
+ ( FCB, Status, Irp, TotalBytesCopied );
}
AFD_DbgPrint(MID_TRACE,("Completed %d bytes\n", TotalBytesCopied));
@@ -350,7 +347,7 @@
Status, TotalBytesCopied));
return UnlockAndMaybeComplete
- ( FCB, Status, Irp, TotalBytesCopied, NULL );
+ ( FCB, Status, Irp, TotalBytesCopied );
}
}
@@ -358,7 +355,7 @@
AFD_DbgPrint(MID_TRACE,("Nonblocking\n"));
UnlockBuffers( SendReq->BufferArray, SendReq->BufferCount, FALSE );
return UnlockAndMaybeComplete
- ( FCB, STATUS_CANT_WAIT, Irp, 0, NULL );
+ ( FCB, STATUS_CANT_WAIT, Irp, 0 );
} else {
AFD_DbgPrint(MID_TRACE,("Queuing request\n"));
return LeaveIrpUntilLater( FCB, Irp, FUNCTION_SEND );
@@ -386,10 +383,10 @@
/* Check that the socket is bound */
if( FCB->State != SOCKET_STATE_BOUND )
return UnlockAndMaybeComplete
- ( FCB, STATUS_INVALID_PARAMETER, Irp, 0, NULL );
+ ( FCB, STATUS_INVALID_PARAMETER, Irp, 0 );
if( !(SendReq = LockRequest( Irp, IrpSp )) )
return UnlockAndMaybeComplete
- ( FCB, STATUS_NO_MEMORY, Irp, 0, NULL );
+ ( FCB, STATUS_NO_MEMORY, Irp, 0 );
SendReq->BufferArray = LockBuffers( SendReq->BufferArray,
SendReq->BufferCount,
@@ -398,7 +395,7 @@
if( !SendReq->BufferArray )
return UnlockAndMaybeComplete( FCB, STATUS_ACCESS_VIOLATION,
- Irp, 0, NULL );
+ Irp, 0 );
AFD_DbgPrint
(MID_TRACE,("RemoteAddress #%d Type %d\n",
@@ -431,6 +428,6 @@
AFD_DbgPrint(MID_TRACE,("Dismissing request: %x\n", Status));
return UnlockAndMaybeComplete
- ( FCB, Status, Irp, SendReq->BufferArray[0].len, NULL );
+ ( FCB, Status, Irp, SendReq->BufferArray[0].len );
}
Modified: trunk/reactos/drivers/network/afd/include/afd.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/includ…
==============================================================================
--- trunk/reactos/drivers/network/afd/include/afd.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/include/afd.h [iso-8859-1] Sat Mar 28 18:49:29 2009
@@ -263,8 +263,7 @@
UINT SocketAcquireStateLock( PAFD_FCB FCB );
NTSTATUS NTAPI UnlockAndMaybeComplete
( PAFD_FCB FCB, NTSTATUS Status, PIRP Irp,
- UINT Information,
- PIO_COMPLETION_ROUTINE Completion );
+ UINT Information );
VOID SocketStateUnlock( PAFD_FCB FCB );
NTSTATUS LostSocket( PIRP Irp );
PAFD_HANDLE LockHandles( PAFD_HANDLE HandleArray, UINT HandleCount );