server: proxy: vc hook: check if proxy client is not null
This commit is contained in:
parent
215e41b4ee
commit
715c3f293a
@ -200,11 +200,19 @@ static BOOL pf_server_receive_channel_data_hook(freerdp_peer* peer, UINT16 chann
|
||||
{
|
||||
pServerContext* ps = (pServerContext*)peer->context;
|
||||
pClientContext* pc = ps->pdata->pc;
|
||||
proxyData* pdata = pc->pdata;
|
||||
proxyData* pdata = ps->pdata;
|
||||
proxyConfig* config = pdata->config;
|
||||
size_t i;
|
||||
const char* channel_name = WTSChannelGetName(peer, channelId);
|
||||
|
||||
/*
|
||||
* client side is not initialized yet, call original callback.
|
||||
* this is probably a drdynvc message between peer and proxy server,
|
||||
* which doesn't need to be proxied.
|
||||
*/
|
||||
if (!pc)
|
||||
goto original_cb;
|
||||
|
||||
for (i = 0; i < config->PassthroughCount; i++)
|
||||
{
|
||||
if (strncmp(channel_name, config->Passthrough[i], CHANNEL_NAME_LEN) == 0)
|
||||
@ -227,6 +235,7 @@ static BOOL pf_server_receive_channel_data_hook(freerdp_peer* peer, UINT16 chann
|
||||
}
|
||||
}
|
||||
|
||||
original_cb:
|
||||
return server_receive_channel_data_original(peer, channelId, data, size, flags, totalSize);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user