mirror of
https://github.com/reactos/reactos.git
synced 2025-07-23 03:13:43 +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
2 changed files with 25 additions and 3 deletions
|
@ -23,8 +23,30 @@ NTAPI
|
||||||
NtListenPort(IN HANDLE PortHandle,
|
NtListenPort(IN HANDLE PortHandle,
|
||||||
OUT PPORT_MESSAGE ConnectMessage)
|
OUT PPORT_MESSAGE ConnectMessage)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
NTSTATUS Status;
|
||||||
return STATUS_NOT_IMPLEMENTED;
|
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
|
// Gets the message type, removing the kernel-mode flag
|
||||||
//
|
//
|
||||||
#define LpcpGetMessageType(x) \
|
#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
|
// Waits on an LPC semaphore for a receive operation
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue