mirror of
https://github.com/reactos/reactos.git
synced 2024-07-08 13:45:06 +00:00
- Implement NtListenPort as a wrapper around NtReplyWaitReceivePort that only listens for connection requests. SMSS can now do this.
svn path=/trunk/; revision=24668
This commit is contained in:
parent
850c098196
commit
fa1547f01d
|
@ -23,8 +23,30 @@ NTAPI
|
|||
NtListenPort(IN HANDLE PortHandle,
|
||||
OUT PPORT_MESSAGE ConnectMessage)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
NTSTATUS Status;
|
||||
PAGED_CODE();
|
||||
LPCTRACE(LPC_LISTEN_DEBUG, "Handle: %lx\n", PortHandle);
|
||||
|
||||
/* Wait forever for a connection request. */
|
||||
for (;;)
|
||||
{
|
||||
/* Do the wait */
|
||||
Status = NtReplyWaitReceivePort(PortHandle,
|
||||
NULL,
|
||||
NULL,
|
||||
ConnectMessage);
|
||||
|
||||
/* Accept only LPC_CONNECTION_REQUEST requests. */
|
||||
if ((Status != STATUS_SUCCESS) ||
|
||||
(LpcpGetMessageType(ConnectMessage) == LPC_CONNECTION_REQUEST))
|
||||
{
|
||||
/* Break out */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Return status */
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
// Gets the message type, removing the kernel-mode flag
|
||||
//
|
||||
#define LpcpGetMessageType(x) \
|
||||
((x)->u2.s2.MessageType &~ LPCP_KERNEL_MESSAGE)
|
||||
((x)->u2.s2.Type &~ LPCP_KERNEL_MESSAGE)
|
||||
|
||||
//
|
||||
// Waits on an LPC semaphore for a receive operation
|
||||
|
|
Loading…
Reference in a new issue