Fixed stream API for Stream_Copy.

This commit is contained in:
Armin Novak 2016-03-01 11:39:21 +01:00
parent a98e0f9ebb
commit e7814d5855
5 changed files with 11 additions and 11 deletions

View File

@ -958,7 +958,7 @@ static UINT drdynvc_process_create_request(drdynvcPlugin* drdynvc, int Sp, int c
Stream_Write_UINT8(data_out, 0x10 | cbChId);
Stream_SetPosition(s, 1);
Stream_Copy(data_out, s, pos - 1);
Stream_Copy(s, data_out, pos - 1);
if (channel_status == CHANNEL_RC_OK)
{

View File

@ -79,7 +79,7 @@ UINT tsmf_ifman_exchange_capability_request(TSMF_IFMAN* ifman)
if (!Stream_EnsureRemainingCapacity(ifman->output, ifman->input_size + 4))
return ERROR_OUTOFMEMORY;
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);
if (Stream_GetRemainingLength(ifman->output) < 4)

View File

@ -463,7 +463,7 @@ static int fastpath_recv_update_data(rdpFastPath* fastpath, wStream* s)
Stream_SetPosition(fastpath->updateData, 0);
Stream_Copy(fastpath->updateData, cs, size);
Stream_Copy(cs, fastpath->updateData, size);
}
else if (fragmentation == FASTPATH_FRAGMENT_NEXT)
{
@ -491,7 +491,7 @@ static int fastpath_recv_update_data(rdpFastPath* fastpath, wStream* s)
goto out_fail;
}
Stream_Copy(fastpath->updateData, cs, size);
Stream_Copy(cs, fastpath->updateData, size);
}
else if (fragmentation == FASTPATH_FRAGMENT_LAST)
{
@ -519,7 +519,7 @@ static int fastpath_recv_update_data(rdpFastPath* fastpath, wStream* s)
goto out_fail;
}
Stream_Copy(fastpath->updateData, cs, size);
Stream_Copy(cs, fastpath->updateData, size);
Stream_SealLength(fastpath->updateData);
Stream_SetPosition(fastpath->updateData, 0);

View File

@ -192,7 +192,7 @@ static BOOL update_message_SurfaceCommand(rdpContext* context, wStream* s)
if (!wParam)
return FALSE;
Stream_Copy(wParam, s, Stream_GetRemainingLength(s));
Stream_Copy(s, wParam, Stream_GetRemainingLength(s));
Stream_SetPosition(wParam, 0);
return MessageQueue_Post(context->update->queue, (void*) context,

View File

@ -240,7 +240,7 @@ static INLINE void Stream_Fill(wStream* _s, int _v, size_t _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);
Stream_Seek(_dst, _n);