mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-14 08:24:16 +09:00
Added const to function buffer pointers
This commit is contained in:
@@ -52,8 +52,10 @@ typedef BOOL (*psPeerLogon)(freerdp_peer* peer, SEC_WINNT_AUTH_IDENTITY* identit
|
||||
typedef BOOL (*psPeerAdjustMonitorsLayout)(freerdp_peer* peer);
|
||||
typedef BOOL (*psPeerClientCapabilities)(freerdp_peer* peer);
|
||||
|
||||
typedef int (*psPeerSendChannelData)(freerdp_peer* peer, UINT16 channelId, BYTE* data, int size);
|
||||
typedef int (*psPeerReceiveChannelData)(freerdp_peer* peer, UINT16 channelId, BYTE* data, int size,
|
||||
typedef int (*psPeerSendChannelData)(freerdp_peer* peer, UINT16 channelId, const BYTE* data,
|
||||
int size);
|
||||
typedef int (*psPeerReceiveChannelData)(freerdp_peer* peer, UINT16 channelId, const BYTE* data,
|
||||
int size,
|
||||
int flags, int totalSize);
|
||||
|
||||
typedef HANDLE(*psPeerVirtualChannelOpen)(freerdp_peer* peer, const char* name, UINT32 flags);
|
||||
|
||||
@@ -352,7 +352,7 @@ int rts_extract_pdu_signature(rdpRpc* rpc, RtsPduSignature* signature, rpcconn_r
|
||||
}
|
||||
|
||||
UINT32 rts_identify_pdu_signature(rdpRpc* rpc, RtsPduSignature* signature,
|
||||
RTS_PDU_SIGNATURE_ENTRY** entry)
|
||||
const RTS_PDU_SIGNATURE_ENTRY** entry)
|
||||
{
|
||||
int i, j;
|
||||
RtsPduSignature* pSignature;
|
||||
@@ -388,7 +388,7 @@ UINT32 rts_identify_pdu_signature(rdpRpc* rpc, RtsPduSignature* signature,
|
||||
int rts_print_pdu_signature(rdpRpc* rpc, RtsPduSignature* signature)
|
||||
{
|
||||
UINT32 SignatureId;
|
||||
RTS_PDU_SIGNATURE_ENTRY* entry;
|
||||
const RTS_PDU_SIGNATURE_ENTRY* entry;
|
||||
WLog_INFO(TAG, "RTS PDU Signature: Flags: 0x%04"PRIX16" NumberOfCommands: %"PRIu16"",
|
||||
signature->Flags, signature->NumberOfCommands);
|
||||
SignatureId = rts_identify_pdu_signature(rpc, signature, &entry);
|
||||
|
||||
@@ -184,7 +184,7 @@ FREERDP_LOCAL BOOL rts_match_pdu_signature(rdpRpc* rpc,
|
||||
FREERDP_LOCAL int rts_extract_pdu_signature(rdpRpc* rpc,
|
||||
RtsPduSignature* signature, rpcconn_rts_hdr_t* rts);
|
||||
FREERDP_LOCAL UINT32 rts_identify_pdu_signature(rdpRpc* rpc,
|
||||
RtsPduSignature* signature, RTS_PDU_SIGNATURE_ENTRY** entry);
|
||||
RtsPduSignature* signature, const RTS_PDU_SIGNATURE_ENTRY** entry);
|
||||
FREERDP_LOCAL int rts_print_pdu_signature(rdpRpc* rpc,
|
||||
RtsPduSignature* signature);
|
||||
|
||||
|
||||
@@ -363,7 +363,7 @@ static BOOL wts_write_drdynvc_create_request(wStream* s, UINT32 ChannelId,
|
||||
}
|
||||
|
||||
static BOOL WTSProcessChannelData(rdpPeerChannel* channel, UINT16 channelId,
|
||||
BYTE* data, int size, int flags, int totalSize)
|
||||
const BYTE* data, int size, int flags, int totalSize)
|
||||
{
|
||||
BOOL ret = TRUE;
|
||||
|
||||
@@ -401,7 +401,7 @@ static BOOL WTSProcessChannelData(rdpPeerChannel* channel, UINT16 channelId,
|
||||
}
|
||||
|
||||
static int WTSReceiveChannelData(freerdp_peer* client, UINT16 channelId,
|
||||
BYTE* data, int size, int flags, int totalSize)
|
||||
const BYTE* data, int size, int flags, int totalSize)
|
||||
{
|
||||
UINT32 i;
|
||||
BOOL status = FALSE;
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <freerdp/utils/pcap.h>
|
||||
#include <freerdp/log.h>
|
||||
|
||||
#include "../cache/cache.h"
|
||||
#include "surface.h"
|
||||
|
||||
#define TAG FREERDP_TAG("core.surface")
|
||||
@@ -46,6 +47,7 @@ static BOOL update_recv_surfcmd_bitmap_header_ex(wStream* s, TS_COMPRESSED_BITMA
|
||||
static BOOL update_recv_surfcmd_bitmap_ex(wStream* s, TS_BITMAP_DATA_EX* bmp)
|
||||
{
|
||||
size_t pos;
|
||||
|
||||
if (!s || !bmp)
|
||||
return FALSE;
|
||||
|
||||
@@ -67,6 +69,7 @@ static BOOL update_recv_surfcmd_bitmap_ex(wStream* s, TS_BITMAP_DATA_EX* bmp)
|
||||
}
|
||||
|
||||
memset(&bmp->exBitmapDataHeader, 0, sizeof(TS_COMPRESSED_BITMAP_HEADER_EX));
|
||||
|
||||
if (bmp->flags & EX_COMPRESSED_BITMAP_HEADER_PRESENT)
|
||||
{
|
||||
if (!update_recv_surfcmd_bitmap_header_ex(s, &bmp->exBitmapDataHeader))
|
||||
@@ -79,7 +82,6 @@ static BOOL update_recv_surfcmd_bitmap_ex(wStream* s, TS_BITMAP_DATA_EX* bmp)
|
||||
pos = Stream_GetPosition(s) + bmp->bitmapDataLength;
|
||||
bmp->bitmapData = Stream_Pointer(s);
|
||||
Stream_SetPosition(s, pos);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -97,6 +99,7 @@ static BOOL update_recv_surfcmd_surface_bits(rdpUpdate* update, wStream* s)
|
||||
Stream_Read_UINT16(s, cmd->destTop);
|
||||
Stream_Read_UINT16(s, cmd->destRight);
|
||||
Stream_Read_UINT16(s, cmd->destBottom);
|
||||
|
||||
if (!update_recv_surfcmd_bitmap_ex(s, &cmd->bmp))
|
||||
goto fail;
|
||||
|
||||
@@ -107,7 +110,7 @@ static BOOL update_recv_surfcmd_surface_bits(rdpUpdate* update, wStream* s)
|
||||
}
|
||||
|
||||
return update->SurfaceBits(update->context, cmd);
|
||||
fail:
|
||||
fail:
|
||||
free_surface_bits_command(update->context, cmd);
|
||||
return FALSE;
|
||||
}
|
||||
@@ -122,8 +125,8 @@ static BOOL update_recv_surfcmd_frame_marker(rdpUpdate* update, wStream* s)
|
||||
Stream_Read_UINT16(s, marker.frameAction);
|
||||
Stream_Read_UINT32(s, marker.frameId);
|
||||
WLog_Print(update->log, WLOG_DEBUG, "SurfaceFrameMarker: action: %s (%"PRIu32") id: %"PRIu32"",
|
||||
(!marker.frameAction) ? "Begin" : "End",
|
||||
marker.frameAction, marker.frameId);
|
||||
(!marker.frameAction) ? "Begin" : "End",
|
||||
marker.frameAction, marker.frameId);
|
||||
|
||||
if (!update->SurfaceFrameMarker)
|
||||
{
|
||||
@@ -177,7 +180,8 @@ int update_recv_surfcmds(rdpUpdate* update, wStream* s)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static BOOL update_write_surfcmd_bitmap_header_ex(wStream* s, const TS_COMPRESSED_BITMAP_HEADER_EX* header)
|
||||
static BOOL update_write_surfcmd_bitmap_header_ex(wStream* s,
|
||||
const TS_COMPRESSED_BITMAP_HEADER_EX* header)
|
||||
{
|
||||
if (!s || !header)
|
||||
return FALSE;
|
||||
@@ -189,7 +193,6 @@ static BOOL update_write_surfcmd_bitmap_header_ex(wStream* s, const TS_COMPRESSE
|
||||
Stream_Write_UINT32(s, header->lowUniqueId);
|
||||
Stream_Write_UINT64(s, header->tmMilliseconds);
|
||||
Stream_Write_UINT64(s, header->tmSeconds);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -232,7 +235,6 @@ BOOL update_write_surfcmd_surface_bits(wStream* s, const SURFACE_BITS_COMMAND* c
|
||||
Stream_Write_UINT16(s, cmd->destTop);
|
||||
Stream_Write_UINT16(s, cmd->destRight);
|
||||
Stream_Write_UINT16(s, cmd->destBottom);
|
||||
|
||||
return update_write_surfcmd_bitmap_ex(s, &cmd->bmp);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user