Merge pull request #2699 from realjiangms/shadow_connect_disconnect
server/shadow: add connect/disconnect anchor in subsystem callback
This commit is contained in:
commit
d10203c2a2
@ -64,6 +64,8 @@ typedef int (*pfnShadowEnumMonitors)(MONITOR_DEF* monitors, int maxMonitors);
|
|||||||
|
|
||||||
typedef int (*pfnShadowAuthenticate)(rdpShadowSubsystem* subsystem,
|
typedef int (*pfnShadowAuthenticate)(rdpShadowSubsystem* subsystem,
|
||||||
const char* user, const char* domain, const char* password);
|
const char* user, const char* domain, const char* password);
|
||||||
|
typedef BOOL (*pfnShadowClientConnect)(rdpShadowSubsystem* subsystem, rdpShadowClient* client);
|
||||||
|
typedef void (*pfnShadowClientDisconnect)(rdpShadowSubsystem* subsystem, rdpShadowClient* client);
|
||||||
|
|
||||||
typedef int (*pfnShadowSynchronizeEvent)(rdpShadowSubsystem* subsystem, UINT32 flags);
|
typedef int (*pfnShadowSynchronizeEvent)(rdpShadowSubsystem* subsystem, UINT32 flags);
|
||||||
typedef int (*pfnShadowKeyboardEvent)(rdpShadowSubsystem* subsystem, UINT16 flags, UINT16 code);
|
typedef int (*pfnShadowKeyboardEvent)(rdpShadowSubsystem* subsystem, UINT16 flags, UINT16 code);
|
||||||
@ -158,6 +160,8 @@ struct _RDP_SHADOW_ENTRY_POINTS
|
|||||||
pfnShadowExtendedMouseEvent ExtendedMouseEvent; \
|
pfnShadowExtendedMouseEvent ExtendedMouseEvent; \
|
||||||
\
|
\
|
||||||
pfnShadowAuthenticate Authenticate; \
|
pfnShadowAuthenticate Authenticate; \
|
||||||
|
pfnShadowClientConnect ClientConnect; \
|
||||||
|
pfnShadowClientDisconnect ClientDisconnect; \
|
||||||
\
|
\
|
||||||
rdpShadowServer* server
|
rdpShadowServer* server
|
||||||
|
|
||||||
|
@ -248,6 +248,11 @@ BOOL shadow_client_post_connect(freerdp_peer* peer)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (subsystem->ClientConnect)
|
||||||
|
{
|
||||||
|
return subsystem->ClientConnect(subsystem, client);
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1074,6 +1079,11 @@ void* shadow_client_thread(rdpShadowClient* client)
|
|||||||
UpdateSubscriber = NULL;
|
UpdateSubscriber = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (peer->connected && subsystem->ClientDisconnect)
|
||||||
|
{
|
||||||
|
subsystem->ClientDisconnect(subsystem, client);
|
||||||
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
peer->Disconnect(peer);
|
peer->Disconnect(peer);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user