From 784f9eab24735aa625fb66f454d617d80a8e2fbc Mon Sep 17 00:00:00 2001 From: akallabeth Date: Thu, 25 Jul 2024 10:51:13 +0200 Subject: [PATCH] [server,proxy] only intercept drdynvc if requested --- server/proxy/pf_channel.c | 1 + server/proxy/pf_server.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/server/proxy/pf_channel.c b/server/proxy/pf_channel.c index a8f66c4e7..1d771beeb 100644 --- a/server/proxy/pf_channel.c +++ b/server/proxy/pf_channel.c @@ -291,6 +291,7 @@ static PfChannelResult pf_channel_generic_front_data(proxyData* pdata, BOOL pf_channel_setup_generic(pServerStaticChannelContext* channel) { + WINPR_ASSERT(channel); channel->onBackData = pf_channel_generic_back_data; channel->onFrontData = pf_channel_generic_front_data; return TRUE; diff --git a/server/proxy/pf_server.c b/server/proxy/pf_server.c index 5a4828b2a..1562bb123 100644 --- a/server/proxy/pf_server.c +++ b/server/proxy/pf_server.c @@ -213,7 +213,8 @@ static BOOL pf_server_setup_channels(freerdp_peer* peer) goto fail; } - if (strcmp(cname, DRDYNVC_SVC_CHANNEL_NAME) == 0) + if ((strcmp(cname, DRDYNVC_SVC_CHANNEL_NAME) == 0) && + (channelContext->channelMode == PF_UTILS_CHANNEL_INTERCEPT)) { if (!pf_channel_setup_drdynvc(ps->pdata, channelContext)) {