From 564b784ebc519dba38172b6c263897a2c3fc1195 Mon Sep 17 00:00:00 2001 From: Kobi Mizrachi Date: Wed, 10 Jun 2020 10:38:32 +0300 Subject: [PATCH] server: proxy: do not start client if post connect hook failed --- server/proxy/pf_server.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/proxy/pf_server.c b/server/proxy/pf_server.c index 78bf7c138..8bbc28a1b 100644 --- a/server/proxy/pf_server.c +++ b/server/proxy/pf_server.c @@ -170,6 +170,9 @@ static BOOL pf_server_post_connect(freerdp_peer* peer) return FALSE; } + if (!pf_modules_run_hook(HOOK_TYPE_SERVER_POST_CONNECT, pdata)) + return FALSE; + /* Start a proxy's client in it's own thread */ if (!(pdata->client_thread = CreateThread(NULL, 0, pf_client_start, pc, 0, NULL))) { @@ -179,7 +182,7 @@ static BOOL pf_server_post_connect(freerdp_peer* peer) pf_server_register_input_callbacks(peer->input); pf_server_register_update_callbacks(peer->update); - return pf_modules_run_hook(HOOK_TYPE_SERVER_POST_CONNECT, pdata); + return TRUE; } static BOOL pf_server_activate(freerdp_peer* peer)