mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2025-06-03 00:00:20 +00:00
[core,client] Add PostFinalDisconnect callback
To have more fine granied control add a new callback. Now you have the following callback pairs: * PreConnect <--> PostFinalDisconnect * PostConnect <--> PostDisconnect
This commit is contained in:
parent
5a24ec2171
commit
cb5c98aab0
@ -1411,6 +1411,18 @@ static void xf_post_disconnect(freerdp* instance)
|
|||||||
xf_keyboard_free(xfc);
|
xf_keyboard_free(xfc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void xf_post_final_disconnect(freerdp* instance)
|
||||||
|
{
|
||||||
|
xfContext* xfc;
|
||||||
|
rdpContext* context;
|
||||||
|
|
||||||
|
if (!instance || !instance->context)
|
||||||
|
return;
|
||||||
|
|
||||||
|
context = instance->context;
|
||||||
|
xfc = (xfContext*)context;
|
||||||
|
}
|
||||||
|
|
||||||
static int xf_logon_error_info(freerdp* instance, UINT32 data, UINT32 type)
|
static int xf_logon_error_info(freerdp* instance, UINT32 data, UINT32 type)
|
||||||
{
|
{
|
||||||
xfContext* xfc = (xfContext*)instance->context;
|
xfContext* xfc = (xfContext*)instance->context;
|
||||||
@ -1753,6 +1765,7 @@ static BOOL xfreerdp_client_new(freerdp* instance, rdpContext* context)
|
|||||||
instance->PreConnect = xf_pre_connect;
|
instance->PreConnect = xf_pre_connect;
|
||||||
instance->PostConnect = xf_post_connect;
|
instance->PostConnect = xf_post_connect;
|
||||||
instance->PostDisconnect = xf_post_disconnect;
|
instance->PostDisconnect = xf_post_disconnect;
|
||||||
|
instance->PostFinalDisconnect = xf_post_final_disconnect;
|
||||||
instance->AuthenticateEx = client_cli_authenticate_ex;
|
instance->AuthenticateEx = client_cli_authenticate_ex;
|
||||||
instance->ChooseSmartcard = client_cli_choose_smartcard;
|
instance->ChooseSmartcard = client_cli_choose_smartcard;
|
||||||
instance->VerifyCertificateEx = client_cli_verify_certificate_ex;
|
instance->VerifyCertificateEx = client_cli_verify_certificate_ex;
|
||||||
|
@ -460,7 +460,11 @@ owned by rdpRdp */
|
|||||||
ALIGN64 pPostDisconnect
|
ALIGN64 pPostDisconnect
|
||||||
PostDisconnect; /**< (offset 55)
|
PostDisconnect; /**< (offset 55)
|
||||||
Callback for cleaning up
|
Callback for cleaning up
|
||||||
resources allocated by connect callbacks. */
|
resources allocated by post connect callback.
|
||||||
|
|
||||||
|
This will be called before disconnecting and cleaning up the
|
||||||
|
channels.
|
||||||
|
*/
|
||||||
|
|
||||||
ALIGN64 pAuthenticate GatewayAuthenticate; /**< (offset 56)
|
ALIGN64 pAuthenticate GatewayAuthenticate; /**< (offset 56)
|
||||||
Callback for gateway authentication.
|
Callback for gateway authentication.
|
||||||
@ -482,7 +486,14 @@ owned by rdpRdp */
|
|||||||
* callback for loading channel configuration. Might be called multiple
|
* callback for loading channel configuration. Might be called multiple
|
||||||
* times when redirection occurs. */
|
* times when redirection occurs. */
|
||||||
|
|
||||||
UINT64 paddingD[64 - 60]; /* 60 */
|
ALIGN64 pPostDisconnect
|
||||||
|
PostFinalDisconnect; /** < (offset 60)
|
||||||
|
* callback for cleaning up resources allocated in PreConnect
|
||||||
|
*
|
||||||
|
* This will be called after all instance related channels and
|
||||||
|
* threads have been stopped
|
||||||
|
*/
|
||||||
|
UINT64 paddingD[64 - 61]; /* 61 */
|
||||||
|
|
||||||
ALIGN64 pSendChannelData
|
ALIGN64 pSendChannelData
|
||||||
SendChannelData; /* (offset 64)
|
SendChannelData; /* (offset 64)
|
||||||
|
@ -549,6 +549,9 @@ BOOL freerdp_disconnect(freerdp* instance)
|
|||||||
}
|
}
|
||||||
|
|
||||||
freerdp_channels_close(instance->context->channels, instance);
|
freerdp_channels_close(instance->context->channels, instance);
|
||||||
|
|
||||||
|
IFCALL(instance->PostFinalDisconnect, instance);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user