diff --git a/include/freerdp/peer.h b/include/freerdp/peer.h index 9a06524e7..446e35481 100644 --- a/include/freerdp/peer.h +++ b/include/freerdp/peer.h @@ -73,6 +73,7 @@ typedef int (*psPeerVirtualChannelWrite)(freerdp_peer* peer, HANDLE hChannel, co typedef void* (*psPeerVirtualChannelGetData)(freerdp_peer* peer, HANDLE hChannel); typedef int (*psPeerVirtualChannelSetData)(freerdp_peer* peer, HANDLE hChannel, void* data); typedef BOOL (*psPeerSetState)(freerdp_peer* peer, CONNECTION_STATE state); +typedef BOOL (*psPeerReachedState)(freerdp_peer* peer, CONNECTION_STATE state); /** @brief the result of the license callback */ typedef enum @@ -169,6 +170,7 @@ struct rdp_freerdp_peer * \note Must be called after \b Initialize as that also modifies the state. */ ALIGN64 psPeerSetState SetState; + ALIGN64 psPeerReachedState ReachedState; ALIGN64 psSspiNtlmHashCallback SspiNtlmHashCallback; }; diff --git a/libfreerdp/core/peer.c b/libfreerdp/core/peer.c index b847686e6..a155d4ac0 100644 --- a/libfreerdp/core/peer.c +++ b/libfreerdp/core/peer.c @@ -574,6 +574,7 @@ static int peer_recv_callback_internal(rdpTransport* transport, wStream* s, void settings = client->context->settings; WINPR_ASSERT(settings); + IFCALL(client->ReachedState, client, rdp_get_state(rdp)); switch (rdp_get_state(rdp)) { case CONNECTION_STATE_INITIAL: