Add a ClientCapabilities callback

This callback is called when the client capabilities have been received. This callback
appears to be more useful than the Capabilities one that is called just before the server
sends its capabilities.
This commit is contained in:
David Fort 2017-02-21 23:44:47 +01:00
parent 6894ed3af6
commit 7b437178bb
2 changed files with 7 additions and 0 deletions

View File

@ -48,6 +48,7 @@ typedef BOOL (*psPeerPostConnect)(freerdp_peer* peer);
typedef BOOL (*psPeerActivate)(freerdp_peer* peer);
typedef BOOL (*psPeerLogon)(freerdp_peer* peer, SEC_WINNT_AUTH_IDENTITY* identity, BOOL automatic);
typedef BOOL (*psPeerAdjustMonitorsLayout)(freerdp_peer* peer);
typedef BOOL (*psPeerClientCapabilities)(freerdp_peer* peer);
typedef int (*psPeerSendChannelData)(freerdp_peer* peer, UINT16 channelId, BYTE* data, int size);
typedef int (*psPeerReceiveChannelData)(freerdp_peer* peer, UINT16 channelId, BYTE* data, int size,
@ -116,6 +117,7 @@ struct rdp_freerdp_peer
psPeerHasMoreToRead HasMoreToRead;
psPeerGetEventHandles GetEventHandles;
psPeerAdjustMonitorsLayout AdjustMonitorsLayout;
psPeerClientCapabilities ClientCapabilities;
};
#ifdef __cplusplus

View File

@ -1145,12 +1145,17 @@ BOOL rdp_server_accept_mcs_channel_join_request(rdpRdp* rdp, wStream* s)
BOOL rdp_server_accept_confirm_active(rdpRdp* rdp, wStream* s)
{
freerdp_peer *peer = rdp->context->peer;
if (rdp->state != CONNECTION_STATE_CAPABILITIES_EXCHANGE)
return FALSE;
if (!rdp_recv_confirm_active(rdp, s))
return FALSE;
if (peer->ClientCapabilities && !peer->ClientCapabilities(peer))
return FALSE;
if (rdp->settings->SaltedChecksum)
rdp->do_secure_checksum = TRUE;