[channels,rdpdr] remove dead code.

This commit is contained in:
akallabeth 2024-04-21 08:15:41 +02:00 committed by akallabeth
parent 5e5d27cf31
commit 6ce8bc3e98

View File

@ -1861,7 +1861,7 @@ UINT rdpdr_send(rdpdrPlugin* rdpdr, wStream* s)
UINT status = 0;
rdpdrPlugin* plugin = (rdpdrPlugin*)rdpdr;
if (!rdpdr || !s)
if (!s)
{
Stream_Release(s);
return CHANNEL_RC_NULL_DATA;
@ -1870,16 +1870,14 @@ UINT rdpdr_send(rdpdrPlugin* rdpdr, wStream* s)
if (!plugin)
{
Stream_Release(s);
status = CHANNEL_RC_BAD_INIT_HANDLE;
}
else
{
const size_t pos = Stream_GetPosition(s);
rdpdr_dump_send_packet(rdpdr->log, WLOG_TRACE, s, "[rdpdr-channel] send");
status = plugin->channelEntryPoints.pVirtualChannelWriteEx(
plugin->InitHandle, plugin->OpenHandle, Stream_Buffer(s), pos, s);
return CHANNEL_RC_BAD_INIT_HANDLE;
}
const size_t pos = Stream_GetPosition(s);
rdpdr_dump_send_packet(rdpdr->log, WLOG_TRACE, s, "[rdpdr-channel] send");
status = plugin->channelEntryPoints.pVirtualChannelWriteEx(
plugin->InitHandle, plugin->OpenHandle, Stream_Buffer(s), pos, s);
if (status != CHANNEL_RC_OK)
{
Stream_Release(s);