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)) {