mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user