server: add WTSVirtualChannelManagerCheckFileDescriptorEx API
This commit is contained in:
parent
b37081a35c
commit
e0fa47f3b3
@ -59,6 +59,7 @@ extern "C"
|
||||
FREERDP_API void WTSVirtualChannelManagerGetFileDescriptor(HANDLE hServer, void** fds,
|
||||
int* fds_count);
|
||||
FREERDP_API BOOL WTSVirtualChannelManagerCheckFileDescriptor(HANDLE hServer);
|
||||
FREERDP_API BOOL WTSVirtualChannelManagerCheckFileDescriptorEx(HANDLE hServer, BOOL autoOpen);
|
||||
FREERDP_API HANDLE WTSVirtualChannelManagerGetEventHandle(HANDLE hServer);
|
||||
FREERDP_API BOOL WTSVirtualChannelManagerIsChannelJoined(HANDLE hServer, const char* name);
|
||||
FREERDP_API BYTE WTSVirtualChannelManagerGetDrdynvcState(HANDLE hServer);
|
||||
|
@ -450,16 +450,16 @@ void WTSVirtualChannelManagerGetFileDescriptor(HANDLE hServer, void** fds, int*
|
||||
#endif
|
||||
}
|
||||
|
||||
BOOL WTSVirtualChannelManagerCheckFileDescriptor(HANDLE hServer)
|
||||
static BOOL WTSVirtualChannelManagerOpen(WTSVirtualChannelManager* vcm)
|
||||
{
|
||||
wMessage message;
|
||||
BOOL status = TRUE;
|
||||
rdpPeerChannel* channel;
|
||||
UINT32 dynvc_caps;
|
||||
WTSVirtualChannelManager* vcm = (WTSVirtualChannelManager*)hServer;
|
||||
if (!vcm)
|
||||
return FALSE;
|
||||
|
||||
if ((vcm->drdynvc_state == DRDYNVC_STATE_NONE) && vcm->client->activated)
|
||||
{
|
||||
rdpPeerChannel* channel;
|
||||
UINT32 dynvc_caps;
|
||||
|
||||
/* Initialize drdynvc channel once and only once. */
|
||||
vcm->drdynvc_state = DRDYNVC_STATE_INITIALIZED;
|
||||
channel =
|
||||
@ -476,6 +476,26 @@ BOOL WTSVirtualChannelManagerCheckFileDescriptor(HANDLE hServer)
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL WTSVirtualChannelManagerCheckFileDescriptorEx(HANDLE hServer, BOOL autoOpen)
|
||||
{
|
||||
wMessage message;
|
||||
BOOL status = TRUE;
|
||||
WTSVirtualChannelManager* vcm;
|
||||
|
||||
if (!hServer || hServer == INVALID_HANDLE_VALUE)
|
||||
return FALSE;
|
||||
|
||||
vcm = (WTSVirtualChannelManager*)hServer;
|
||||
|
||||
if (autoOpen)
|
||||
{
|
||||
if (!WTSVirtualChannelManagerOpen(vcm))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
while (MessageQueue_Peek(vcm->queue, &message, TRUE))
|
||||
{
|
||||
BYTE* buffer;
|
||||
@ -499,6 +519,11 @@ BOOL WTSVirtualChannelManagerCheckFileDescriptor(HANDLE hServer)
|
||||
return status;
|
||||
}
|
||||
|
||||
BOOL WTSVirtualChannelManagerCheckFileDescriptor(HANDLE hServer)
|
||||
{
|
||||
return WTSVirtualChannelManagerCheckFileDescriptorEx(hServer, TRUE);
|
||||
}
|
||||
|
||||
HANDLE WTSVirtualChannelManagerGetEventHandle(HANDLE hServer)
|
||||
{
|
||||
WTSVirtualChannelManager* vcm = (WTSVirtualChannelManager*)hServer;
|
||||
|
Loading…
Reference in New Issue
Block a user