mirror of https://github.com/FreeRDP/FreeRDP
Fixed stream API for Stream_Copy.
This commit is contained in:
parent
a98e0f9ebb
commit
e7814d5855
|
@ -958,8 +958,8 @@ static UINT drdynvc_process_create_request(drdynvcPlugin* drdynvc, int Sp, int c
|
||||||
|
|
||||||
Stream_Write_UINT8(data_out, 0x10 | cbChId);
|
Stream_Write_UINT8(data_out, 0x10 | cbChId);
|
||||||
Stream_SetPosition(s, 1);
|
Stream_SetPosition(s, 1);
|
||||||
Stream_Copy(data_out, s, pos - 1);
|
Stream_Copy(s, data_out, pos - 1);
|
||||||
|
|
||||||
if (channel_status == CHANNEL_RC_OK)
|
if (channel_status == CHANNEL_RC_OK)
|
||||||
{
|
{
|
||||||
WLog_DBG(TAG, "channel created");
|
WLog_DBG(TAG, "channel created");
|
||||||
|
|
|
@ -79,7 +79,7 @@ UINT tsmf_ifman_exchange_capability_request(TSMF_IFMAN* ifman)
|
||||||
if (!Stream_EnsureRemainingCapacity(ifman->output, ifman->input_size + 4))
|
if (!Stream_EnsureRemainingCapacity(ifman->output, ifman->input_size + 4))
|
||||||
return ERROR_OUTOFMEMORY;
|
return ERROR_OUTOFMEMORY;
|
||||||
pos = Stream_GetPosition(ifman->output);
|
pos = Stream_GetPosition(ifman->output);
|
||||||
Stream_Copy(ifman->output, ifman->input, ifman->input_size);
|
Stream_Copy(ifman->input, ifman->output, ifman->input_size);
|
||||||
Stream_SetPosition(ifman->output, pos);
|
Stream_SetPosition(ifman->output, pos);
|
||||||
|
|
||||||
if (Stream_GetRemainingLength(ifman->output) < 4)
|
if (Stream_GetRemainingLength(ifman->output) < 4)
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
* Fast-Path packet format is defined in [MS-RDPBCGR] 2.2.9.1.2, which revises
|
* Fast-Path packet format is defined in [MS-RDPBCGR] 2.2.9.1.2, which revises
|
||||||
* server output packets from the first byte with the goal of improving
|
* server output packets from the first byte with the goal of improving
|
||||||
* bandwidth.
|
* bandwidth.
|
||||||
*
|
*
|
||||||
* Slow-Path packet always starts with TPKT header, which has the first
|
* Slow-Path packet always starts with TPKT header, which has the first
|
||||||
* byte 0x03, while Fast-Path packet starts with 2 zero bits in the first
|
* byte 0x03, while Fast-Path packet starts with 2 zero bits in the first
|
||||||
* two less significant bits of the first byte.
|
* two less significant bits of the first byte.
|
||||||
|
@ -282,7 +282,7 @@ static int fastpath_recv_update(rdpFastPath* fastpath, BYTE updateCode, UINT32 s
|
||||||
if (!fastpath_recv_update_synchronize(fastpath, s))
|
if (!fastpath_recv_update_synchronize(fastpath, s))
|
||||||
WLog_ERR(TAG, "fastpath_recv_update_synchronize failure but we continue");
|
WLog_ERR(TAG, "fastpath_recv_update_synchronize failure but we continue");
|
||||||
else
|
else
|
||||||
IFCALL(update->Synchronize, context);
|
IFCALL(update->Synchronize, context);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FASTPATH_UPDATETYPE_SURFCMDS:
|
case FASTPATH_UPDATETYPE_SURFCMDS:
|
||||||
|
@ -463,7 +463,7 @@ static int fastpath_recv_update_data(rdpFastPath* fastpath, wStream* s)
|
||||||
|
|
||||||
Stream_SetPosition(fastpath->updateData, 0);
|
Stream_SetPosition(fastpath->updateData, 0);
|
||||||
|
|
||||||
Stream_Copy(fastpath->updateData, cs, size);
|
Stream_Copy(cs, fastpath->updateData, size);
|
||||||
}
|
}
|
||||||
else if (fragmentation == FASTPATH_FRAGMENT_NEXT)
|
else if (fragmentation == FASTPATH_FRAGMENT_NEXT)
|
||||||
{
|
{
|
||||||
|
@ -491,7 +491,7 @@ static int fastpath_recv_update_data(rdpFastPath* fastpath, wStream* s)
|
||||||
goto out_fail;
|
goto out_fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
Stream_Copy(fastpath->updateData, cs, size);
|
Stream_Copy(cs, fastpath->updateData, size);
|
||||||
}
|
}
|
||||||
else if (fragmentation == FASTPATH_FRAGMENT_LAST)
|
else if (fragmentation == FASTPATH_FRAGMENT_LAST)
|
||||||
{
|
{
|
||||||
|
@ -519,7 +519,7 @@ static int fastpath_recv_update_data(rdpFastPath* fastpath, wStream* s)
|
||||||
goto out_fail;
|
goto out_fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
Stream_Copy(fastpath->updateData, cs, size);
|
Stream_Copy(cs, fastpath->updateData, size);
|
||||||
|
|
||||||
Stream_SealLength(fastpath->updateData);
|
Stream_SealLength(fastpath->updateData);
|
||||||
Stream_SetPosition(fastpath->updateData, 0);
|
Stream_SetPosition(fastpath->updateData, 0);
|
||||||
|
@ -546,7 +546,7 @@ static int fastpath_recv_update_data(rdpFastPath* fastpath, wStream* s)
|
||||||
out_fail:
|
out_fail:
|
||||||
|
|
||||||
if (cs != s) {
|
if (cs != s) {
|
||||||
Stream_Release(cs);
|
Stream_Release(cs);
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -192,7 +192,7 @@ static BOOL update_message_SurfaceCommand(rdpContext* context, wStream* s)
|
||||||
if (!wParam)
|
if (!wParam)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
Stream_Copy(wParam, s, Stream_GetRemainingLength(s));
|
Stream_Copy(s, wParam, Stream_GetRemainingLength(s));
|
||||||
Stream_SetPosition(wParam, 0);
|
Stream_SetPosition(wParam, 0);
|
||||||
|
|
||||||
return MessageQueue_Post(context->update->queue, (void*) context,
|
return MessageQueue_Post(context->update->queue, (void*) context,
|
||||||
|
|
|
@ -240,7 +240,7 @@ static INLINE void Stream_Fill(wStream* _s, int _v, size_t _n)
|
||||||
Stream_Seek(_s, _n);
|
Stream_Seek(_s, _n);
|
||||||
}
|
}
|
||||||
|
|
||||||
static INLINE void Stream_Copy(wStream* _dst, wStream* _src, size_t _n)
|
static INLINE void Stream_Copy(wStream* _src, wStream* _dst, size_t _n)
|
||||||
{
|
{
|
||||||
memcpy(_dst->pointer, _src->pointer, _n);
|
memcpy(_dst->pointer, _src->pointer, _n);
|
||||||
Stream_Seek(_dst, _n);
|
Stream_Seek(_dst, _n);
|
||||||
|
|
Loading…
Reference in New Issue