From: kubistika Date: Tue, 16 Jul 2019 13:18:26 +0000 (+0300) Subject: server: proxy: remove unnecessary function handle_client_disconnection X-Git-Tag: 2.0.0~412^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d0065ee9a155ec28104343884836d76ea1549309;p=platform%2Fupstream%2Ffreerdp.git server: proxy: remove unnecessary function handle_client_disconnection --- diff --git a/server/proxy/pf_server.c b/server/proxy/pf_server.c index de55c3d..5e4c782 100644 --- a/server/proxy/pf_server.c +++ b/server/proxy/pf_server.c @@ -52,23 +52,6 @@ #define TAG PROXY_TAG("server") -static void pf_server_handle_client_disconnection(freerdp_peer* client) -{ - pServerContext* ps = (pServerContext*)client->context; - rdpContext* pc = (rdpContext*) ps->pdata->pc; - proxyData* pdata = ps->pdata; - WLog_INFO(TAG, "Connection with %s was closed; closing proxy's client <> target server connection %s", - client->hostname, pc->settings->ServerHostname); - /* Mark connection closed for sContext */ - SetEvent(pdata->connectionClosed); - freerdp_abort_connect(pc->instance); - /* Close connection to remote host */ - WLog_DBG(TAG, "Waiting for proxy's client thread to finish"); - WaitForSingleObject(ps->thread, INFINITE); - CloseHandle(ps->thread); - ps->thread = NULL; -} - static BOOL pf_server_parse_target_from_routing_token(rdpContext* context, char** target, DWORD* port) { @@ -366,11 +349,6 @@ fail: if (ps->gfx) rdpgfx_server_context_free(ps->gfx); - - if (client->connected && !pf_common_connection_aborted_by_peer(pdata)) - { - pf_server_handle_client_disconnection(client); - } pc = (rdpContext*) pdata->pc; freerdp_client_stop(pc);