Merge pull request #2644 from xhaakon/shadow-server-disposal

shadow_client: dispose encomsp and remdesk
This commit is contained in:
Marc-André Moreau 2015-05-22 14:15:31 -04:00
commit 649d49549e
5 changed files with 21 additions and 0 deletions

View File

@ -147,6 +147,10 @@ void shadow_client_context_free(freerdp_peer* peer, rdpShadowClient* client)
shadow_encoder_free(client->encoder);
client->encoder = NULL;
}
shadow_client_encomsp_uninit(client);
shadow_client_remdesk_uninit(client);
}
void shadow_client_message_free(wMessage* message)

View File

@ -109,3 +109,10 @@ int shadow_client_encomsp_init(rdpShadowClient* client)
return 1;
}
void shadow_client_encomsp_uninit(rdpShadowClient* client)
{
if (client->encomsp) {
client->encomsp->Stop(client->encomsp);
client->encomsp = NULL;
}
}

View File

@ -29,6 +29,7 @@ extern "C" {
#endif
int shadow_client_encomsp_init(rdpShadowClient* client);
void shadow_client_encomsp_uninit(rdpShadowClient* client);
#ifdef __cplusplus
}

View File

@ -37,3 +37,11 @@ int shadow_client_remdesk_init(rdpShadowClient* client)
return 1;
}
void shadow_client_remdesk_uninit(rdpShadowClient* client)
{
if (client->remdesk) {
client->remdesk->Stop(client->remdesk);
client->remdesk = NULL;
}
}

View File

@ -29,6 +29,7 @@ extern "C" {
#endif
int shadow_client_remdesk_init(rdpShadowClient* client);
void shadow_client_remdesk_uninit(rdpShadowClient* client);
#ifdef __cplusplus
}