event.c: Don't infinite loop while completing a zero-length read.

tcp.c: Correctly pass on length in recv.

svn path=/trunk/; revision=10999
This commit is contained in:
Art Yerkes 2004-09-23 14:16:27 +00:00
parent 0dbb29fa23
commit d774499bf8
2 changed files with 8 additions and 4 deletions

View file

@ -91,12 +91,15 @@ int TCPSocketState(void *ClientData,
("Completing Receive Request: %x\n",
Bucket->Request));
Complete( Bucket->Request.RequestContext,
STATUS_SUCCESS,
Received );
} else {
Complete( Bucket->Request.RequestContext,
STATUS_SUCCESS, Received );
} else if( Status == STATUS_SUCCESS ) {
InsertHeadList( &Connection->ReceiveRequest,
&Bucket->Entry );
break;
} else {
Complete( Bucket->Request.RequestContext, Status, 0 );
break;
}
}
}

View file

@ -317,6 +317,7 @@ NTSTATUS TCPReceiveData
Status = STATUS_PENDING;
} else {
TI_DbgPrint(MID_TRACE,("Got status %x, bytes %d\n", Status, Received));
*BytesReceived = Received;
}
KeReleaseSpinLock(&Connection->Lock, OldIrql);