From 22c47b7def5aca097784ec52acfbf733702deac7 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Thu, 22 Dec 2022 14:57:43 +0100 Subject: [PATCH] [server,proxy] use cached channel id --- server/proxy/pf_client.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/server/proxy/pf_client.c b/server/proxy/pf_client.c index efbfe401c..0dfac6b69 100644 --- a/server/proxy/pf_client.c +++ b/server/proxy/pf_client.c @@ -442,7 +442,6 @@ static BOOL pf_client_receive_channel_data_hook(freerdp* instance, UINT16 channe pServerContext* ps; proxyData* pdata; pServerStaticChannelContext* channel; - UINT16 server_channel_id; UINT64 channelId64 = channelId; WINPR_ASSERT(instance); @@ -466,15 +465,13 @@ static BOOL pf_client_receive_channel_data_hook(freerdp* instance, UINT16 channe switch (channel->onBackData(pdata, channel, xdata, xsize, flags, totalSize)) { case PF_CHANNEL_RESULT_PASS: - server_channel_id = WTSChannelGetId(ps->context.peer, channel->channel_name); - /* Ignore messages for channels that can not be mapped. * The client might not have enabled support for this specific channel, * so just drop the message. */ - if (server_channel_id == 0) + if (channel->front_channel_id == 0) return TRUE; - return ps->context.peer->SendChannelPacket(ps->context.peer, server_channel_id, + return ps->context.peer->SendChannelPacket(ps->context.peer, channel->front_channel_id, totalSize, flags, xdata, xsize); case PF_CHANNEL_RESULT_DROP: return TRUE;