Remove symbols exported by accident.
This commit is contained in:
Родитель
8e195c469d
Коммит
7c243da6e1
|
@ -43,8 +43,8 @@
|
|||
|
||||
extern const STATIC_ENTRY_TABLE CLIENT_STATIC_ENTRY_TABLES[];
|
||||
|
||||
void* freerdp_channels_find_static_entry_in_table(const STATIC_ENTRY_TABLE* table,
|
||||
const char* identifier)
|
||||
static void* freerdp_channels_find_static_entry_in_table(const STATIC_ENTRY_TABLE* table,
|
||||
const char* identifier)
|
||||
{
|
||||
size_t index = 0;
|
||||
STATIC_ENTRY* pEntry;
|
||||
|
@ -330,7 +330,7 @@ void freerdp_channels_addin_list_free(FREERDP_ADDIN** ppAddins)
|
|||
|
||||
extern const STATIC_ENTRY CLIENT_VirtualChannelEntryEx_TABLE[];
|
||||
|
||||
BOOL freerdp_channels_is_virtual_channel_entry_ex(LPCSTR pszName)
|
||||
static BOOL freerdp_channels_is_virtual_channel_entry_ex(LPCSTR pszName)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
*
|
||||
* @return 0 on success, otherwise a Win32 error code
|
||||
*/
|
||||
UINT cliprdr_server_packet_send(CliprdrServerPrivate* cliprdr, wStream* s)
|
||||
static UINT cliprdr_server_packet_send(CliprdrServerPrivate* cliprdr, wStream* s)
|
||||
{
|
||||
UINT rc;
|
||||
size_t pos, size;
|
||||
|
@ -970,7 +970,7 @@ static UINT cliprdr_server_init(CliprdrServerContext* context)
|
|||
*
|
||||
* @return 0 on success, otherwise a Win32 error code
|
||||
*/
|
||||
UINT cliprdr_server_read(CliprdrServerContext* context)
|
||||
static UINT cliprdr_server_read(CliprdrServerContext* context)
|
||||
{
|
||||
wStream* s;
|
||||
size_t position;
|
||||
|
|
|
@ -99,7 +99,7 @@ void mappedGeometryUnref(MAPPED_GEOMETRY* g)
|
|||
free(g);
|
||||
}
|
||||
|
||||
void freerdp_rgndata_reset(FREERDP_RGNDATA* data)
|
||||
static void freerdp_rgndata_reset(FREERDP_RGNDATA* data)
|
||||
{
|
||||
data->nRectCount = 0;
|
||||
}
|
||||
|
|
|
@ -115,22 +115,22 @@ typedef struct _RDPEI_PLUGIN RDPEI_PLUGIN;
|
|||
*
|
||||
* @return 0 on success, otherwise a Win32 error code
|
||||
*/
|
||||
UINT rdpei_send_frame(RdpeiClientContext* context);
|
||||
static UINT rdpei_send_frame(RdpeiClientContext* context);
|
||||
|
||||
const char* RDPEI_EVENTID_STRINGS[] = { "",
|
||||
"EVENTID_SC_READY",
|
||||
"EVENTID_CS_READY",
|
||||
"EVENTID_TOUCH",
|
||||
"EVENTID_SUSPEND_TOUCH",
|
||||
"EVENTID_RESUME_TOUCH",
|
||||
"EVENTID_DISMISS_HOVERING_CONTACT" };
|
||||
static const char* RDPEI_EVENTID_STRINGS[] = { "",
|
||||
"EVENTID_SC_READY",
|
||||
"EVENTID_CS_READY",
|
||||
"EVENTID_TOUCH",
|
||||
"EVENTID_SUSPEND_TOUCH",
|
||||
"EVENTID_RESUME_TOUCH",
|
||||
"EVENTID_DISMISS_HOVERING_CONTACT" };
|
||||
|
||||
/**
|
||||
* Function description
|
||||
*
|
||||
* @return 0 on success, otherwise a Win32 error code
|
||||
*/
|
||||
UINT rdpei_add_frame(RdpeiClientContext* context)
|
||||
static UINT rdpei_add_frame(RdpeiClientContext* context)
|
||||
{
|
||||
int i;
|
||||
RDPINPUT_CONTACT_DATA* contact;
|
||||
|
@ -241,7 +241,8 @@ out:
|
|||
*
|
||||
* @return 0 on success, otherwise a Win32 error code
|
||||
*/
|
||||
UINT rdpei_send_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s, UINT16 eventId, UINT32 pduLength)
|
||||
static UINT rdpei_send_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s, UINT16 eventId,
|
||||
UINT32 pduLength)
|
||||
{
|
||||
UINT status;
|
||||
Stream_SetPosition(s, 0);
|
||||
|
@ -263,7 +264,7 @@ UINT rdpei_send_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s, UINT16 eventId
|
|||
*
|
||||
* @return 0 on success, otherwise a Win32 error code
|
||||
*/
|
||||
UINT rdpei_send_cs_ready_pdu(RDPEI_CHANNEL_CALLBACK* callback)
|
||||
static UINT rdpei_send_cs_ready_pdu(RDPEI_CHANNEL_CALLBACK* callback)
|
||||
{
|
||||
UINT status;
|
||||
wStream* s;
|
||||
|
@ -292,7 +293,7 @@ UINT rdpei_send_cs_ready_pdu(RDPEI_CHANNEL_CALLBACK* callback)
|
|||
return status;
|
||||
}
|
||||
|
||||
void rdpei_print_contact_flags(UINT32 contactFlags)
|
||||
static void rdpei_print_contact_flags(UINT32 contactFlags)
|
||||
{
|
||||
if (contactFlags & CONTACT_FLAG_DOWN)
|
||||
WLog_DBG(TAG, " CONTACT_FLAG_DOWN");
|
||||
|
@ -318,7 +319,7 @@ void rdpei_print_contact_flags(UINT32 contactFlags)
|
|||
*
|
||||
* @return 0 on success, otherwise a Win32 error code
|
||||
*/
|
||||
UINT rdpei_write_touch_frame(wStream* s, RDPINPUT_TOUCH_FRAME* frame)
|
||||
static UINT rdpei_write_touch_frame(wStream* s, RDPINPUT_TOUCH_FRAME* frame)
|
||||
{
|
||||
UINT32 index;
|
||||
int rectSize = 2;
|
||||
|
@ -401,7 +402,8 @@ UINT rdpei_write_touch_frame(wStream* s, RDPINPUT_TOUCH_FRAME* frame)
|
|||
*
|
||||
* @return 0 on success, otherwise a Win32 error code
|
||||
*/
|
||||
UINT rdpei_send_touch_event_pdu(RDPEI_CHANNEL_CALLBACK* callback, RDPINPUT_TOUCH_FRAME* frame)
|
||||
static UINT rdpei_send_touch_event_pdu(RDPEI_CHANNEL_CALLBACK* callback,
|
||||
RDPINPUT_TOUCH_FRAME* frame)
|
||||
{
|
||||
UINT status;
|
||||
wStream* s;
|
||||
|
@ -443,7 +445,7 @@ UINT rdpei_send_touch_event_pdu(RDPEI_CHANNEL_CALLBACK* callback, RDPINPUT_TOUCH
|
|||
*
|
||||
* @return 0 on success, otherwise a Win32 error code
|
||||
*/
|
||||
UINT rdpei_recv_sc_ready_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s)
|
||||
static UINT rdpei_recv_sc_ready_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s)
|
||||
{
|
||||
UINT32 protocolVersion;
|
||||
Stream_Read_UINT32(s, protocolVersion); /* protocolVersion (4 bytes) */
|
||||
|
@ -464,7 +466,7 @@ UINT rdpei_recv_sc_ready_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s)
|
|||
*
|
||||
* @return 0 on success, otherwise a Win32 error code
|
||||
*/
|
||||
UINT rdpei_recv_suspend_touch_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s)
|
||||
static UINT rdpei_recv_suspend_touch_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s)
|
||||
{
|
||||
RdpeiClientContext* rdpei = (RdpeiClientContext*)callback->plugin->pInterface;
|
||||
UINT error = CHANNEL_RC_OK;
|
||||
|
@ -481,7 +483,7 @@ UINT rdpei_recv_suspend_touch_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s)
|
|||
*
|
||||
* @return 0 on success, otherwise a Win32 error code
|
||||
*/
|
||||
UINT rdpei_recv_resume_touch_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s)
|
||||
static UINT rdpei_recv_resume_touch_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s)
|
||||
{
|
||||
RdpeiClientContext* rdpei = (RdpeiClientContext*)callback->plugin->pInterface;
|
||||
UINT error = CHANNEL_RC_OK;
|
||||
|
@ -498,7 +500,7 @@ UINT rdpei_recv_resume_touch_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s)
|
|||
*
|
||||
* @return 0 on success, otherwise a Win32 error code
|
||||
*/
|
||||
UINT rdpei_recv_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s)
|
||||
static UINT rdpei_recv_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s)
|
||||
{
|
||||
UINT16 eventId;
|
||||
UINT32 pduLength;
|
||||
|
@ -699,7 +701,7 @@ static UINT rdpei_plugin_terminated(IWTSPlugin* pPlugin)
|
|||
* Channel Client Interface
|
||||
*/
|
||||
|
||||
int rdpei_get_version(RdpeiClientContext* context)
|
||||
static int rdpei_get_version(RdpeiClientContext* context)
|
||||
{
|
||||
RDPEI_PLUGIN* rdpei = (RDPEI_PLUGIN*)context->handle;
|
||||
return rdpei->version;
|
||||
|
@ -745,7 +747,7 @@ UINT rdpei_send_frame(RdpeiClientContext* context)
|
|||
*
|
||||
* @return 0 on success, otherwise a Win32 error code
|
||||
*/
|
||||
UINT rdpei_add_contact(RdpeiClientContext* context, RDPINPUT_CONTACT_DATA* contact)
|
||||
static UINT rdpei_add_contact(RdpeiClientContext* context, RDPINPUT_CONTACT_DATA* contact)
|
||||
{
|
||||
RDPINPUT_CONTACT_POINT* contactPoint;
|
||||
RDPEI_PLUGIN* rdpei = (RDPEI_PLUGIN*)context->handle;
|
||||
|
@ -763,7 +765,8 @@ UINT rdpei_add_contact(RdpeiClientContext* context, RDPINPUT_CONTACT_DATA* conta
|
|||
*
|
||||
* @return 0 on success, otherwise a Win32 error code
|
||||
*/
|
||||
UINT rdpei_touch_begin(RdpeiClientContext* context, int externalId, int x, int y, int* contactId)
|
||||
static UINT rdpei_touch_begin(RdpeiClientContext* context, int externalId, int x, int y,
|
||||
int* contactId)
|
||||
{
|
||||
unsigned int i;
|
||||
int contactIdlocal = -1;
|
||||
|
@ -812,7 +815,8 @@ UINT rdpei_touch_begin(RdpeiClientContext* context, int externalId, int x, int y
|
|||
*
|
||||
* @return 0 on success, otherwise a Win32 error code
|
||||
*/
|
||||
UINT rdpei_touch_update(RdpeiClientContext* context, int externalId, int x, int y, int* contactId)
|
||||
static UINT rdpei_touch_update(RdpeiClientContext* context, int externalId, int x, int y,
|
||||
int* contactId)
|
||||
{
|
||||
unsigned int i;
|
||||
int contactIdlocal = -1;
|
||||
|
@ -858,7 +862,8 @@ UINT rdpei_touch_update(RdpeiClientContext* context, int externalId, int x, int
|
|||
*
|
||||
* @return 0 on success, otherwise a Win32 error code
|
||||
*/
|
||||
UINT rdpei_touch_end(RdpeiClientContext* context, int externalId, int x, int y, int* contactId)
|
||||
static UINT rdpei_touch_end(RdpeiClientContext* context, int externalId, int x, int y,
|
||||
int* contactId)
|
||||
{
|
||||
unsigned int i;
|
||||
int contactIdlocal = -1;
|
||||
|
|
|
@ -677,7 +677,7 @@ static BOOL rdpsnd_set_subsystem(rdpsndPlugin* rdpsnd, const char* subsystem)
|
|||
return (rdpsnd->subsystem != NULL);
|
||||
}
|
||||
|
||||
BOOL rdpsnd_set_device_name(rdpsndPlugin* rdpsnd, const char* device_name)
|
||||
static BOOL rdpsnd_set_device_name(rdpsndPlugin* rdpsnd, const char* device_name)
|
||||
{
|
||||
free(rdpsnd->device_name);
|
||||
rdpsnd->device_name = _strdup(device_name);
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
#include <freerdp/server/rdpgfx.h>
|
||||
#include <freerdp/server/disp.h>
|
||||
|
||||
void freerdp_channels_dummy()
|
||||
void freerdp_channels_dummy(void)
|
||||
{
|
||||
audin_server_context* audin;
|
||||
RdpsndServerContext* rdpsnd;
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
#include "smartcard_main.h"
|
||||
|
||||
const char* smartcard_get_ioctl_string(UINT32 ioControlCode, BOOL funcName)
|
||||
static const char* smartcard_get_ioctl_string(UINT32 ioControlCode, BOOL funcName)
|
||||
{
|
||||
switch (ioControlCode)
|
||||
{
|
||||
|
|
|
@ -901,8 +901,8 @@ void smartcard_trace_list_readers_return(SMARTCARD_DEVICE* smartcard, const List
|
|||
free(mszA);
|
||||
}
|
||||
|
||||
LONG smartcard_unpack_connect_common(SMARTCARD_DEVICE* smartcard, wStream* s,
|
||||
Connect_Common* common)
|
||||
static LONG smartcard_unpack_connect_common(SMARTCARD_DEVICE* smartcard, wStream* s,
|
||||
Connect_Common* common)
|
||||
{
|
||||
LONG status;
|
||||
|
||||
|
|
|
@ -428,7 +428,7 @@ int tsmf_window_resize(TSMFGstreamerDecoder* decoder, int x, int y, int width, i
|
|||
return 0;
|
||||
}
|
||||
|
||||
int tsmf_window_pause(TSMFGstreamerDecoder* decoder)
|
||||
static int tsmf_window_pause(TSMFGstreamerDecoder* decoder)
|
||||
{
|
||||
if (!decoder)
|
||||
return -1;
|
||||
|
@ -436,7 +436,7 @@ int tsmf_window_pause(TSMFGstreamerDecoder* decoder)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int tsmf_window_resume(TSMFGstreamerDecoder* decoder)
|
||||
static int tsmf_window_resume(TSMFGstreamerDecoder* decoder)
|
||||
{
|
||||
if (!decoder)
|
||||
return -1;
|
||||
|
|
|
@ -62,7 +62,7 @@ static int tsmf_gstreamer_pipeline_set_state(TSMFGstreamerDecoder* mdecoder,
|
|||
GstState desired_state);
|
||||
static BOOL tsmf_gstreamer_buffer_level(ITSMFDecoder* decoder);
|
||||
|
||||
const char* get_type(TSMFGstreamerDecoder* mdecoder)
|
||||
static const char* get_type(TSMFGstreamerDecoder* mdecoder)
|
||||
{
|
||||
if (!mdecoder)
|
||||
return NULL;
|
||||
|
@ -995,7 +995,7 @@ static BOOL tsmf_gstreamer_update_rendering_area(ITSMFDecoder* decoder, int newX
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL tsmf_gstreamer_ack(ITSMFDecoder* decoder, BOOL (*cb)(void*, BOOL), void* stream)
|
||||
static BOOL tsmf_gstreamer_ack(ITSMFDecoder* decoder, BOOL (*cb)(void*, BOOL), void* stream)
|
||||
{
|
||||
TSMFGstreamerDecoder* mdecoder = (TSMFGstreamerDecoder*)decoder;
|
||||
DEBUG_TSMF("");
|
||||
|
@ -1004,7 +1004,7 @@ BOOL tsmf_gstreamer_ack(ITSMFDecoder* decoder, BOOL (*cb)(void*, BOOL), void* st
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL tsmf_gstreamer_sync(ITSMFDecoder* decoder, void (*cb)(void*), void* stream)
|
||||
static BOOL tsmf_gstreamer_sync(ITSMFDecoder* decoder, void (*cb)(void*), void* stream)
|
||||
{
|
||||
TSMFGstreamerDecoder* mdecoder = (TSMFGstreamerDecoder*)decoder;
|
||||
DEBUG_TSMF("");
|
||||
|
|
|
@ -63,8 +63,6 @@ typedef struct _TSMFGstreamerDecoder
|
|||
|
||||
} TSMFGstreamerDecoder;
|
||||
|
||||
const char* get_type(TSMFGstreamerDecoder* mdecoder);
|
||||
|
||||
const char* tsmf_platform_get_video_sink(void);
|
||||
const char* tsmf_platform_get_audio_sink(void);
|
||||
|
||||
|
|
|
@ -309,7 +309,7 @@ UINT tsmf_ifman_remove_stream(TSMF_IFMAN* ifman)
|
|||
return status;
|
||||
}
|
||||
|
||||
float tsmf_stream_read_float(wStream* s)
|
||||
static float tsmf_stream_read_float(wStream* s)
|
||||
{
|
||||
float fValue;
|
||||
UINT32 iValue;
|
||||
|
|
|
@ -174,7 +174,7 @@ static void video_client_context_set_geometry(VideoClientContext* video,
|
|||
video->priv->geometry = geometry;
|
||||
}
|
||||
|
||||
VideoClientContextPriv* VideoClientContextPriv_new(VideoClientContext* video)
|
||||
static VideoClientContextPriv* VideoClientContextPriv_new(VideoClientContext* video)
|
||||
{
|
||||
VideoClientContextPriv* ret = calloc(1, sizeof(*ret));
|
||||
if (!ret)
|
||||
|
|
|
@ -1192,7 +1192,7 @@ BOOL freerdp_set_connection_type(rdpSettings* settings, UINT32 type)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
int freerdp_map_keyboard_layout_name_to_id(char* name)
|
||||
static int freerdp_map_keyboard_layout_name_to_id(char* name)
|
||||
{
|
||||
int i;
|
||||
int id = 0;
|
||||
|
@ -1323,8 +1323,8 @@ static int freerdp_detect_windows_style_command_line_syntax(int argc, char** arg
|
|||
return detect_status;
|
||||
}
|
||||
|
||||
int freerdp_detect_posix_style_command_line_syntax(int argc, char** argv, size_t* count,
|
||||
BOOL ignoreUnknown)
|
||||
static int freerdp_detect_posix_style_command_line_syntax(int argc, char** argv, size_t* count,
|
||||
BOOL ignoreUnknown)
|
||||
{
|
||||
int status;
|
||||
DWORD flags;
|
||||
|
|
|
@ -254,7 +254,7 @@ BOOL audio_format_compatible(const AUDIO_FORMAT* with, const AUDIO_FORMAT* what)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL audio_format_valid(const AUDIO_FORMAT* format)
|
||||
static BOOL audio_format_valid(const AUDIO_FORMAT* format)
|
||||
{
|
||||
if (!format)
|
||||
return FALSE;
|
||||
|
|
|
@ -524,7 +524,7 @@ static BOOL CALLBACK h264_register_subsystems(PINIT_ONCE once, PVOID param, PVOI
|
|||
return i > 0;
|
||||
}
|
||||
|
||||
BOOL h264_context_init(H264_CONTEXT* h264)
|
||||
static BOOL h264_context_init(H264_CONTEXT* h264)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
|
@ -418,7 +418,8 @@ static void nsc_rle_compress_data(NSC_CONTEXT* context)
|
|||
}
|
||||
}
|
||||
|
||||
UINT32 nsc_compute_byte_count(NSC_CONTEXT* context, UINT32* ByteCount, UINT32 width, UINT32 height)
|
||||
static UINT32 nsc_compute_byte_count(NSC_CONTEXT* context, UINT32* ByteCount, UINT32 width,
|
||||
UINT32 height)
|
||||
{
|
||||
UINT32 tempWidth;
|
||||
UINT32 tempHeight;
|
||||
|
|
|
@ -1391,7 +1391,7 @@ static BOOL computeRegion(const RFX_RECT* rects, int numRects, REGION16* region,
|
|||
|
||||
#define TILE_NO(v) ((v) / 64)
|
||||
|
||||
BOOL setupWorkers(RFX_CONTEXT* context, int nbTiles)
|
||||
static BOOL setupWorkers(RFX_CONTEXT* context, int nbTiles)
|
||||
{
|
||||
RFX_CONTEXT_PRIV* priv = context->priv;
|
||||
void* pmem;
|
||||
|
@ -1647,8 +1647,8 @@ skip_encoding_loop:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
RFX_MESSAGE* rfx_split_message(RFX_CONTEXT* context, RFX_MESSAGE* message, int* numMessages,
|
||||
int maxDataSize)
|
||||
static RFX_MESSAGE* rfx_split_message(RFX_CONTEXT* context, RFX_MESSAGE* message, int* numMessages,
|
||||
int maxDataSize)
|
||||
{
|
||||
int i, j;
|
||||
UINT32 tileDataSize;
|
||||
|
@ -1813,7 +1813,7 @@ static BOOL rfx_write_message_region(RFX_CONTEXT* context, wStream* s, RFX_MESSA
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL rfx_write_message_frame_end(RFX_CONTEXT* context, wStream* s, RFX_MESSAGE* message)
|
||||
static BOOL rfx_write_message_frame_end(RFX_CONTEXT* context, wStream* s, RFX_MESSAGE* message)
|
||||
{
|
||||
if (!Stream_EnsureRemainingCapacity(s, 8))
|
||||
return FALSE;
|
||||
|
|
|
@ -50,7 +50,7 @@ rfx_quantization_decode_block_NEON(INT16* buffer, const int buffer_size, const U
|
|||
} while (buf < buf_end);
|
||||
}
|
||||
|
||||
void rfx_quantization_decode_NEON(INT16* buffer, const UINT32* quantVals)
|
||||
static void rfx_quantization_decode_NEON(INT16* buffer, const UINT32* quantVals)
|
||||
{
|
||||
rfx_quantization_decode_block_NEON(&buffer[0], 1024, quantVals[8] - 1); /* HL1 */
|
||||
rfx_quantization_decode_block_NEON(&buffer[1024], 1024, quantVals[7] - 1); /* LH1 */
|
||||
|
@ -220,7 +220,7 @@ rfx_dwt_2d_decode_block_NEON(INT16* buffer, INT16* idwt, int subband_width)
|
|||
rfx_dwt_2d_decode_block_vert_NEON(l_dst, h_dst, buffer, subband_width);
|
||||
}
|
||||
|
||||
void rfx_dwt_2d_decode_NEON(INT16* buffer, INT16* dwt_buffer)
|
||||
static void rfx_dwt_2d_decode_NEON(INT16* buffer, INT16* dwt_buffer)
|
||||
{
|
||||
rfx_dwt_2d_decode_block_NEON(buffer + 3840, dwt_buffer, 8);
|
||||
rfx_dwt_2d_decode_block_NEON(buffer + 3072, dwt_buffer, 16);
|
||||
|
|
|
@ -43,8 +43,8 @@
|
|||
* LL3 4032 8x8 64
|
||||
*/
|
||||
|
||||
void rfx_quantization_decode_block(const primitives_t* prims, INT16* buffer, int buffer_size,
|
||||
UINT32 factor)
|
||||
static void rfx_quantization_decode_block(const primitives_t* prims, INT16* buffer, int buffer_size,
|
||||
UINT32 factor)
|
||||
{
|
||||
if (factor == 0)
|
||||
return;
|
||||
|
|
|
@ -26,7 +26,4 @@
|
|||
FREERDP_LOCAL void rfx_quantization_decode(INT16* buffer, const UINT32* quantization_values);
|
||||
FREERDP_LOCAL void rfx_quantization_encode(INT16* buffer, const UINT32* quantization_values);
|
||||
|
||||
FREERDP_LOCAL void rfx_quantization_decode_block(const primitives_t* prims, INT16* buffer,
|
||||
int buffer_size, UINT32 factor);
|
||||
|
||||
#endif /* FREERDP_LIB_CODEC_RFX_QUANTIZATION_H */
|
||||
|
|
|
@ -34,8 +34,13 @@ static const char* const CTRLACTION_STRINGS[] =
|
|||
"CTRLACTION_COOPERATE"
|
||||
};
|
||||
*/
|
||||
static BOOL rdp_recv_server_synchronize_pdu(rdpRdp* rdp, wStream* s);
|
||||
static BOOL rdp_recv_client_font_list_pdu(wStream* s);
|
||||
static BOOL rdp_recv_server_font_map_pdu(rdpRdp* rdp, wStream* s);
|
||||
static BOOL rdp_recv_client_font_map_pdu(rdpRdp* rdp, wStream* s);
|
||||
static BOOL rdp_send_server_font_map_pdu(rdpRdp* rdp);
|
||||
|
||||
void rdp_write_synchronize_pdu(wStream* s, rdpSettings* settings)
|
||||
static void rdp_write_synchronize_pdu(wStream* s, rdpSettings* settings)
|
||||
{
|
||||
Stream_Write_UINT16(s, SYNCMSGTYPE_SYNC); /* messageType (2 bytes) */
|
||||
Stream_Write_UINT16(s, settings->PduSource); /* targetUser (2 bytes) */
|
||||
|
@ -87,7 +92,7 @@ BOOL rdp_send_client_synchronize_pdu(rdpRdp* rdp)
|
|||
return rdp_send_data_pdu(rdp, s, DATA_PDU_TYPE_SYNCHRONIZE, rdp->mcs->userId);
|
||||
}
|
||||
|
||||
BOOL rdp_recv_control_pdu(wStream* s, UINT16* action)
|
||||
static BOOL rdp_recv_control_pdu(wStream* s, UINT16* action)
|
||||
{
|
||||
if (Stream_GetRemainingLength(s) < 8)
|
||||
return FALSE;
|
||||
|
@ -98,7 +103,7 @@ BOOL rdp_recv_control_pdu(wStream* s, UINT16* action)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
void rdp_write_client_control_pdu(wStream* s, UINT16 action)
|
||||
static void rdp_write_client_control_pdu(wStream* s, UINT16 action)
|
||||
{
|
||||
Stream_Write_UINT16(s, action); /* action (2 bytes) */
|
||||
Stream_Write_UINT16(s, 0); /* grantId (2 bytes) */
|
||||
|
@ -152,13 +157,13 @@ BOOL rdp_send_client_control_pdu(rdpRdp* rdp, UINT16 action)
|
|||
return rdp_send_data_pdu(rdp, s, DATA_PDU_TYPE_CONTROL, rdp->mcs->userId);
|
||||
}
|
||||
|
||||
void rdp_write_persistent_list_entry(wStream* s, UINT32 key1, UINT32 key2)
|
||||
static void rdp_write_persistent_list_entry(wStream* s, UINT32 key1, UINT32 key2)
|
||||
{
|
||||
Stream_Write_UINT32(s, key1); /* key1 (4 bytes) */
|
||||
Stream_Write_UINT32(s, key2); /* key2 (4 bytes) */
|
||||
}
|
||||
|
||||
void rdp_write_client_persistent_key_list_pdu(wStream* s, rdpSettings* settings)
|
||||
static void rdp_write_client_persistent_key_list_pdu(wStream* s, rdpSettings* settings)
|
||||
{
|
||||
Stream_Write_UINT16(s, 0); /* numEntriesCache0 (2 bytes) */
|
||||
Stream_Write_UINT16(s, 0); /* numEntriesCache1 (2 bytes) */
|
||||
|
@ -192,7 +197,7 @@ BOOL rdp_recv_client_font_list_pdu(wStream* s)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
void rdp_write_client_font_list_pdu(wStream* s, UINT16 flags)
|
||||
static void rdp_write_client_font_list_pdu(wStream* s, UINT16 flags)
|
||||
{
|
||||
Stream_Write_UINT16(s, 0); /* numberFonts (2 bytes) */
|
||||
Stream_Write_UINT16(s, 0); /* totalNumFonts (2 bytes) */
|
||||
|
|
|
@ -42,22 +42,16 @@ FREERDP_LOCAL BOOL rdp_recv_deactivate_all(rdpRdp* rdp, wStream* s);
|
|||
FREERDP_LOCAL BOOL rdp_send_deactivate_all(rdpRdp* rdp);
|
||||
|
||||
FREERDP_LOCAL BOOL rdp_recv_synchronize_pdu(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_recv_server_synchronize_pdu(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_send_server_synchronize_pdu(rdpRdp* rdp);
|
||||
FREERDP_LOCAL BOOL rdp_recv_client_synchronize_pdu(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_send_client_synchronize_pdu(rdpRdp* rdp);
|
||||
FREERDP_LOCAL BOOL rdp_recv_control_pdu(wStream* s, UINT16* action);
|
||||
|
||||
FREERDP_LOCAL BOOL rdp_recv_server_control_pdu(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_send_server_control_cooperate_pdu(rdpRdp* rdp);
|
||||
FREERDP_LOCAL BOOL rdp_send_server_control_granted_pdu(rdpRdp* rdp);
|
||||
FREERDP_LOCAL BOOL rdp_send_client_control_pdu(rdpRdp* rdp, UINT16 action);
|
||||
FREERDP_LOCAL BOOL rdp_send_client_persistent_key_list_pdu(rdpRdp* rdp);
|
||||
FREERDP_LOCAL BOOL rdp_recv_client_font_list_pdu(wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_send_client_font_list_pdu(rdpRdp* rdp, UINT16 flags);
|
||||
FREERDP_LOCAL BOOL rdp_recv_font_map_pdu(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_recv_server_font_map_pdu(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_recv_client_font_map_pdu(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_send_server_font_map_pdu(rdpRdp* rdp);
|
||||
|
||||
FREERDP_LOCAL BOOL rdp_server_accept_client_control_pdu(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_server_accept_client_font_list_pdu(rdpRdp* rdp, wStream* s);
|
||||
|
|
|
@ -316,7 +316,7 @@ static BOOL autodetect_send_netchar_result(rdpContext* context, UINT16 sequenceN
|
|||
return rdp_send_message_channel_pdu(context->rdp, s, SEC_AUTODETECT_REQ);
|
||||
}
|
||||
|
||||
BOOL autodetect_send_netchar_sync(rdpRdp* rdp, UINT16 sequenceNumber)
|
||||
static BOOL autodetect_send_netchar_sync(rdpRdp* rdp, UINT16 sequenceNumber)
|
||||
{
|
||||
wStream* s;
|
||||
/* Send the response PDU to the server */
|
||||
|
|
|
@ -185,6 +185,7 @@
|
|||
*/
|
||||
|
||||
static int rdp_client_connect_finalize(rdpRdp* rdp);
|
||||
static BOOL rdp_send_server_control_granted_pdu(rdpRdp* rdp);
|
||||
|
||||
static BOOL rdp_client_reset_codecs(rdpContext* context)
|
||||
{
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
|
||||
#include "display.h"
|
||||
|
||||
BOOL display_write_monitor_layout_pdu(wStream* s, UINT32 monitorCount,
|
||||
const MONITOR_DEF* monitorDefArray)
|
||||
static BOOL display_write_monitor_layout_pdu(wStream* s, UINT32 monitorCount,
|
||||
const MONITOR_DEF* monitorDefArray)
|
||||
{
|
||||
UINT32 index;
|
||||
const MONITOR_DEF* monitor;
|
||||
|
|
|
@ -33,6 +33,39 @@
|
|||
|
||||
#define TAG FREERDP_TAG("core.gcc")
|
||||
|
||||
static BOOL gcc_read_client_cluster_data(wStream* s, rdpMcs* mcs, UINT16 blockLength);
|
||||
static BOOL gcc_read_client_core_data(wStream* s, rdpMcs* mcs, UINT16 blockLength);
|
||||
static BOOL gcc_read_client_data_blocks(wStream* s, rdpMcs* mcs, int length);
|
||||
static BOOL gcc_read_server_data_blocks(wStream* s, rdpMcs* mcs, int length);
|
||||
static BOOL gcc_read_user_data_header(wStream* s, UINT16* type, UINT16* length);
|
||||
static void gcc_write_user_data_header(wStream* s, UINT16 type, UINT16 length);
|
||||
|
||||
static void gcc_write_client_core_data(wStream* s, rdpMcs* mcs);
|
||||
static BOOL gcc_read_server_core_data(wStream* s, rdpMcs* mcs);
|
||||
static BOOL gcc_write_server_core_data(wStream* s, rdpMcs* mcs);
|
||||
static BOOL gcc_read_client_security_data(wStream* s, rdpMcs* mcs, UINT16 blockLength);
|
||||
static void gcc_write_client_security_data(wStream* s, rdpMcs* mcs);
|
||||
static BOOL gcc_read_server_security_data(wStream* s, rdpMcs* mcs);
|
||||
static BOOL gcc_write_server_security_data(wStream* s, rdpMcs* mcs);
|
||||
static BOOL gcc_read_client_network_data(wStream* s, rdpMcs* mcs, UINT16 blockLength);
|
||||
static void gcc_write_client_network_data(wStream* s, rdpMcs* mcs);
|
||||
static BOOL gcc_read_server_network_data(wStream* s, rdpMcs* mcs);
|
||||
static BOOL gcc_write_server_network_data(wStream* s, rdpMcs* mcs);
|
||||
static void gcc_write_client_cluster_data(wStream* s, rdpMcs* mcs);
|
||||
static BOOL gcc_read_client_monitor_data(wStream* s, rdpMcs* mcs, UINT16 blockLength);
|
||||
static void gcc_write_client_monitor_data(wStream* s, rdpMcs* mcs);
|
||||
static BOOL gcc_read_client_monitor_extended_data(wStream* s, rdpMcs* mcs, UINT16 blockLength);
|
||||
static void gcc_write_client_monitor_extended_data(wStream* s, rdpMcs* mcs);
|
||||
static BOOL gcc_read_client_message_channel_data(wStream* s, rdpMcs* mcs, UINT16 blockLength);
|
||||
static void gcc_write_client_message_channel_data(wStream* s, rdpMcs* mcs);
|
||||
static BOOL gcc_read_server_message_channel_data(wStream* s, rdpMcs* mcs);
|
||||
static BOOL gcc_write_server_message_channel_data(wStream* s, rdpMcs* mcs);
|
||||
static BOOL gcc_read_client_multitransport_channel_data(wStream* s, rdpMcs* mcs,
|
||||
UINT16 blockLength);
|
||||
static void gcc_write_client_multitransport_channel_data(wStream* s, rdpMcs* mcs);
|
||||
static BOOL gcc_read_server_multitransport_channel_data(wStream* s, rdpMcs* mcs);
|
||||
static void gcc_write_server_multitransport_channel_data(wStream* s, rdpMcs* mcs);
|
||||
|
||||
static DWORD rdp_version_common(DWORD serverVersion, DWORD clientVersion)
|
||||
{
|
||||
DWORD version = MIN(serverVersion, clientVersion);
|
||||
|
|
|
@ -34,40 +34,7 @@ FREERDP_LOCAL BOOL gcc_read_conference_create_request(wStream* s, rdpMcs* mcs);
|
|||
FREERDP_LOCAL void gcc_write_conference_create_request(wStream* s, wStream* userData);
|
||||
FREERDP_LOCAL BOOL gcc_read_conference_create_response(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL void gcc_write_conference_create_response(wStream* s, wStream* userData);
|
||||
FREERDP_LOCAL BOOL gcc_read_client_data_blocks(wStream* s, rdpMcs* mcs, int length);
|
||||
FREERDP_LOCAL void gcc_write_client_data_blocks(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_read_server_data_blocks(wStream* s, rdpMcs* mcs, int length);
|
||||
FREERDP_LOCAL BOOL gcc_write_server_data_blocks(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_read_user_data_header(wStream* s, UINT16* type, UINT16* length);
|
||||
FREERDP_LOCAL void gcc_write_user_data_header(wStream* s, UINT16 type, UINT16 length);
|
||||
FREERDP_LOCAL BOOL gcc_read_client_core_data(wStream* s, rdpMcs* mcs, UINT16 blockLength);
|
||||
FREERDP_LOCAL void gcc_write_client_core_data(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_read_server_core_data(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_write_server_core_data(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_read_client_security_data(wStream* s, rdpMcs* mcs, UINT16 blockLength);
|
||||
FREERDP_LOCAL void gcc_write_client_security_data(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_read_server_security_data(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_write_server_security_data(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_read_client_network_data(wStream* s, rdpMcs* mcs, UINT16 blockLength);
|
||||
FREERDP_LOCAL void gcc_write_client_network_data(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_read_server_network_data(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_write_server_network_data(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_read_client_cluster_data(wStream* s, rdpMcs* mcs, UINT16 blockLength);
|
||||
FREERDP_LOCAL void gcc_write_client_cluster_data(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_read_client_monitor_data(wStream* s, rdpMcs* mcs, UINT16 blockLength);
|
||||
FREERDP_LOCAL void gcc_write_client_monitor_data(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_read_client_monitor_extended_data(wStream* s, rdpMcs* mcs,
|
||||
UINT16 blockLength);
|
||||
FREERDP_LOCAL void gcc_write_client_monitor_extended_data(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_read_client_message_channel_data(wStream* s, rdpMcs* mcs,
|
||||
UINT16 blockLength);
|
||||
FREERDP_LOCAL void gcc_write_client_message_channel_data(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_read_server_message_channel_data(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_write_server_message_channel_data(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_read_client_multitransport_channel_data(wStream* s, rdpMcs* mcs,
|
||||
UINT16 blockLength);
|
||||
FREERDP_LOCAL void gcc_write_client_multitransport_channel_data(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL gcc_read_server_multitransport_channel_data(wStream* s, rdpMcs* mcs);
|
||||
FREERDP_LOCAL void gcc_write_server_multitransport_channel_data(wStream* s, rdpMcs* mcs);
|
||||
|
||||
#endif /* FREERDP_LIB_CORE_GCC_H */
|
||||
|
|
|
@ -67,7 +67,7 @@ static struct
|
|||
{ INFO_HIDEF_RAIL_SUPPORTED, "INFO_HIDEF_RAIL_SUPPORTED" },
|
||||
};
|
||||
|
||||
FREERDP_LOCAL char* rdp_info_package_flags_description(UINT32 flags)
|
||||
static char* rdp_info_package_flags_description(UINT32 flags)
|
||||
{
|
||||
char* result;
|
||||
size_t maximum_size = 1; /* Reserve space for the terminating '\0' by strcat if all flags set */
|
||||
|
|
|
@ -58,13 +58,10 @@
|
|||
|
||||
#define SAVE_SESSION_PDU_VERSION_ONE 0x0001
|
||||
|
||||
FREERDP_LOCAL void rdp_write_auto_reconnect_cookie(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_recv_client_info(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_send_client_info(rdpRdp* rdp);
|
||||
FREERDP_LOCAL BOOL rdp_recv_save_session_info(rdpRdp* rdp, wStream* s);
|
||||
FREERDP_LOCAL BOOL rdp_send_save_session_info(rdpContext* context, UINT32 type, void* data);
|
||||
FREERDP_LOCAL BOOL rdp_send_server_status_info(rdpContext* context, UINT32 status);
|
||||
|
||||
FREERDP_LOCAL char* rdp_info_package_flags_description(UINT32 flags);
|
||||
|
||||
#endif /* FREERDP_LIB_CORE_INFO_H */
|
||||
|
|
|
@ -321,7 +321,7 @@ error_path:
|
|||
* @return if the operation completed successfully
|
||||
*/
|
||||
|
||||
BOOL license_read_preamble(wStream* s, BYTE* bMsgType, BYTE* flags, UINT16* wMsgSize)
|
||||
static BOOL license_read_preamble(wStream* s, BYTE* bMsgType, BYTE* flags, UINT16* wMsgSize)
|
||||
{
|
||||
/* preamble (4 bytes) */
|
||||
if (Stream_GetRemainingLength(s) < 4)
|
||||
|
@ -634,7 +634,7 @@ BOOL license_generate_hwid(rdpLicense* license)
|
|||
WINPR_MD5_DIGEST_LENGTH);
|
||||
}
|
||||
|
||||
BOOL license_get_server_rsa_public_key(rdpLicense* license)
|
||||
static BOOL license_get_server_rsa_public_key(rdpLicense* license)
|
||||
{
|
||||
BYTE* Exponent;
|
||||
BYTE* Modulus;
|
||||
|
@ -907,8 +907,8 @@ BOOL license_write_binary_blob(wStream* s, const LICENSE_BLOB* blob)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL license_write_encrypted_premaster_secret_blob(wStream* s, const LICENSE_BLOB* blob,
|
||||
UINT32 ModulusLength)
|
||||
static BOOL license_write_encrypted_premaster_secret_blob(wStream* s, const LICENSE_BLOB* blob,
|
||||
UINT32 ModulusLength)
|
||||
{
|
||||
UINT32 length;
|
||||
length = ModulusLength + 8;
|
||||
|
|
|
@ -269,7 +269,8 @@ static BOOL freerdp_listener_get_fds(freerdp_listener* instance, void** rfds, in
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
DWORD freerdp_listener_get_event_handles(freerdp_listener* instance, HANDLE* events, DWORD nCount)
|
||||
static DWORD freerdp_listener_get_event_handles(freerdp_listener* instance, HANDLE* events,
|
||||
DWORD nCount)
|
||||
{
|
||||
int index;
|
||||
rdpListener* listener = (rdpListener*)instance->listener;
|
||||
|
|
|
@ -192,6 +192,16 @@ static const char* const mcs_result_enumerated[] =
|
|||
};
|
||||
*/
|
||||
|
||||
static BOOL mcs_merge_domain_parameters(DomainParameters* targetParameters,
|
||||
DomainParameters* minimumParameters,
|
||||
DomainParameters* maximumParameters,
|
||||
DomainParameters* pOutParameters);
|
||||
|
||||
static BOOL mcs_write_connect_initial(wStream* s, rdpMcs* mcs, wStream* userData);
|
||||
static BOOL mcs_write_connect_response(wStream* s, rdpMcs* mcs, wStream* userData);
|
||||
static BOOL mcs_read_domain_mcspdu_header(wStream* s, enum DomainMCSPDU* domainMCSPDU,
|
||||
UINT16* length);
|
||||
|
||||
static int mcs_initialize_client_channels(rdpMcs* mcs, rdpSettings* settings)
|
||||
{
|
||||
UINT32 index;
|
||||
|
|
|
@ -154,14 +154,6 @@ struct rdp_mcs
|
|||
#define MCS_TYPE_CONNECT_INITIAL 0x65
|
||||
#define MCS_TYPE_CONNECT_RESPONSE 0x66
|
||||
|
||||
FREERDP_LOCAL BOOL mcs_merge_domain_parameters(DomainParameters* targetParameters,
|
||||
DomainParameters* minimumParameters,
|
||||
DomainParameters* maximumParameters,
|
||||
DomainParameters* pOutParameters);
|
||||
|
||||
FREERDP_LOCAL BOOL mcs_write_connect_initial(wStream* s, rdpMcs* mcs, wStream* userData);
|
||||
FREERDP_LOCAL BOOL mcs_write_connect_response(wStream* s, rdpMcs* mcs, wStream* userData);
|
||||
|
||||
FREERDP_LOCAL BOOL mcs_recv_connect_initial(rdpMcs* mcs, wStream* s);
|
||||
FREERDP_LOCAL BOOL mcs_send_connect_initial(rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL mcs_recv_connect_response(rdpMcs* mcs, wStream* s);
|
||||
|
@ -178,8 +170,7 @@ FREERDP_LOCAL BOOL mcs_recv_channel_join_confirm(rdpMcs* mcs, wStream* s, UINT16
|
|||
FREERDP_LOCAL BOOL mcs_send_channel_join_confirm(rdpMcs* mcs, UINT16 channelId);
|
||||
FREERDP_LOCAL BOOL mcs_recv_disconnect_provider_ultimatum(rdpMcs* mcs, wStream* s, int* reason);
|
||||
FREERDP_LOCAL BOOL mcs_send_disconnect_provider_ultimatum(rdpMcs* mcs);
|
||||
FREERDP_LOCAL BOOL mcs_read_domain_mcspdu_header(wStream* s, enum DomainMCSPDU* domainMCSPDU,
|
||||
UINT16* length);
|
||||
|
||||
FREERDP_LOCAL void mcs_write_domain_mcspdu_header(wStream* s, enum DomainMCSPDU domainMCSPDU,
|
||||
UINT16 length, BYTE options);
|
||||
|
||||
|
|
|
@ -108,8 +108,8 @@ static BOOL freerdp_peer_virtual_channel_close(freerdp_peer* client, HANDLE hCha
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
int freerdp_peer_virtual_channel_read(freerdp_peer* client, HANDLE hChannel, BYTE* buffer,
|
||||
UINT32 length)
|
||||
static int freerdp_peer_virtual_channel_read(freerdp_peer* client, HANDLE hChannel, BYTE* buffer,
|
||||
UINT32 length)
|
||||
{
|
||||
return 0; /* this needs to be implemented by the server application */
|
||||
}
|
||||
|
@ -181,7 +181,7 @@ static int freerdp_peer_virtual_channel_write(freerdp_peer* client, HANDLE hChan
|
|||
return 1;
|
||||
}
|
||||
|
||||
void* freerdp_peer_virtual_channel_get_data(freerdp_peer* client, HANDLE hChannel)
|
||||
static void* freerdp_peer_virtual_channel_get_data(freerdp_peer* client, HANDLE hChannel)
|
||||
{
|
||||
rdpPeerChannel* peerChannel = (rdpPeerChannel*)hChannel;
|
||||
|
||||
|
@ -191,7 +191,7 @@ void* freerdp_peer_virtual_channel_get_data(freerdp_peer* client, HANDLE hChanne
|
|||
return peerChannel->extra;
|
||||
}
|
||||
|
||||
int freerdp_peer_virtual_channel_set_data(freerdp_peer* client, HANDLE hChannel, void* data)
|
||||
static int freerdp_peer_virtual_channel_set_data(freerdp_peer* client, HANDLE hChannel, void* data)
|
||||
{
|
||||
rdpPeerChannel* peerChannel = (rdpPeerChannel*)hChannel;
|
||||
|
||||
|
|
|
@ -65,7 +65,8 @@ static const char* rplstat[] = { "succeeded",
|
|||
static BOOL http_proxy_connect(BIO* bufferedBio, const char* hostname, UINT16 port);
|
||||
static BOOL socks_proxy_connect(BIO* bufferedBio, const char* proxyUsername,
|
||||
const char* proxyPassword, const char* hostname, UINT16 port);
|
||||
void proxy_read_environment(rdpSettings* settings, char* envname);
|
||||
static void proxy_read_environment(rdpSettings* settings, char* envname);
|
||||
static BOOL proxy_parse_uri(rdpSettings* settings, const char* uri);
|
||||
|
||||
BOOL proxy_prepare(rdpSettings* settings, const char** lpPeerHostname, UINT16* lpPeerPort,
|
||||
const char** lpProxyUsername, const char** lpProxyPassword)
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
BOOL proxy_prepare(rdpSettings* settings, const char** lpPeerHostname, UINT16* lpPeerPort,
|
||||
const char** lpProxyUsername, const char** lpProxyPassword);
|
||||
BOOL proxy_parse_uri(rdpSettings* settings, const char* uri);
|
||||
|
||||
BOOL proxy_connect(rdpSettings* settings, BIO* bio, const char* proxyUsername,
|
||||
const char* proxyPassword, const char* hostname, UINT16 port);
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
#define TAG FREERDP_TAG("core.rdp")
|
||||
|
||||
const char* DATA_PDU_TYPE_STRINGS[80] = {
|
||||
static const char* DATA_PDU_TYPE_STRINGS[80] = {
|
||||
"?",
|
||||
"?", /* 0x00 - 0x01 */
|
||||
"Update", /* 0x02 */
|
||||
|
@ -102,6 +102,11 @@ const char* DATA_PDU_TYPE_STRINGS[80] = {
|
|||
"?" /* 0x41 - 0x46 */
|
||||
};
|
||||
|
||||
static void rdp_read_flow_control_pdu(wStream* s, UINT16* type);
|
||||
static void rdp_write_share_control_header(wStream* s, UINT16 length, UINT16 type,
|
||||
UINT16 channel_id);
|
||||
static void rdp_write_share_data_header(wStream* s, UINT16 length, BYTE type, UINT32 share_id);
|
||||
|
||||
/**
|
||||
* Read RDP Security Header.\n
|
||||
* @msdn{cc240579}
|
||||
|
|
|
@ -186,16 +186,11 @@ FREERDP_LOCAL void rdp_write_security_header(wStream* s, UINT16 flags);
|
|||
|
||||
FREERDP_LOCAL BOOL rdp_read_share_control_header(wStream* s, UINT16* length, UINT16* type,
|
||||
UINT16* channel_id);
|
||||
FREERDP_LOCAL void rdp_write_share_control_header(wStream* s, UINT16 length, UINT16 type,
|
||||
UINT16 channel_id);
|
||||
|
||||
FREERDP_LOCAL BOOL rdp_read_share_data_header(wStream* s, UINT16* length, BYTE* type,
|
||||
UINT32* share_id, BYTE* compressed_type,
|
||||
UINT16* compressed_len);
|
||||
|
||||
FREERDP_LOCAL void rdp_write_share_data_header(wStream* s, UINT16 length, BYTE type,
|
||||
UINT32 share_id);
|
||||
|
||||
FREERDP_LOCAL wStream* rdp_send_stream_init(rdpRdp* rdp);
|
||||
FREERDP_LOCAL wStream* rdp_send_stream_pdu_init(rdpRdp* rdp);
|
||||
|
||||
|
@ -218,8 +213,6 @@ FREERDP_LOCAL int rdp_recv_message_channel_pdu(rdpRdp* rdp, wStream* s, UINT16 s
|
|||
|
||||
FREERDP_LOCAL int rdp_recv_out_of_sequence_pdu(rdpRdp* rdp, wStream* s);
|
||||
|
||||
FREERDP_LOCAL void rdp_read_flow_control_pdu(wStream* s, UINT16* type);
|
||||
|
||||
FREERDP_LOCAL int rdp_recv_callback(rdpTransport* transport, wStream* s, void* extra);
|
||||
|
||||
FREERDP_LOCAL int rdp_check_fds(rdpRdp* rdp);
|
||||
|
|
|
@ -188,7 +188,7 @@ void security_mac_salt_key(const BYTE* session_key_blob, const BYTE* client_rand
|
|||
memcpy(output, session_key_blob, 16);
|
||||
}
|
||||
|
||||
BOOL security_md5_16_32_32(const BYTE* in0, const BYTE* in1, const BYTE* in2, BYTE* output)
|
||||
static BOOL security_md5_16_32_32(const BYTE* in0, const BYTE* in1, const BYTE* in2, BYTE* output)
|
||||
{
|
||||
WINPR_DIGEST_CTX* md5 = NULL;
|
||||
BOOL result = FALSE;
|
||||
|
@ -217,8 +217,8 @@ out:
|
|||
return result;
|
||||
}
|
||||
|
||||
BOOL security_md5_16_32_32_Allow_FIPS(const BYTE* in0, const BYTE* in1, const BYTE* in2,
|
||||
BYTE* output)
|
||||
static BOOL security_md5_16_32_32_Allow_FIPS(const BYTE* in0, const BYTE* in1, const BYTE* in2,
|
||||
BYTE* output)
|
||||
{
|
||||
WINPR_DIGEST_CTX* md5 = NULL;
|
||||
BOOL result = FALSE;
|
||||
|
@ -253,7 +253,7 @@ BOOL security_licensing_encryption_key(const BYTE* session_key_blob, const BYTE*
|
|||
output);
|
||||
}
|
||||
|
||||
void security_UINT32_le(BYTE* output, UINT32 value)
|
||||
static void security_UINT32_le(BYTE* output, UINT32 value)
|
||||
{
|
||||
output[0] = (value)&0xFF;
|
||||
output[1] = (value >> 8) & 0xFF;
|
||||
|
@ -645,7 +645,7 @@ BOOL security_establish_keys(const BYTE* client_random, rdpRdp* rdp)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL security_key_update(BYTE* key, BYTE* update_key, int key_len, rdpRdp* rdp)
|
||||
static BOOL security_key_update(BYTE* key, BYTE* update_key, int key_len, rdpRdp* rdp)
|
||||
{
|
||||
BYTE sha1h[WINPR_SHA1_DIGEST_LENGTH];
|
||||
WINPR_DIGEST_CTX* sha1 = NULL;
|
||||
|
|
|
@ -65,6 +65,8 @@
|
|||
* | ... |
|
||||
*/
|
||||
|
||||
static void tpdu_write_header(wStream* s, UINT16 length, BYTE code);
|
||||
|
||||
/**
|
||||
* Read TPDU header.
|
||||
* @param s stream
|
||||
|
|
|
@ -43,7 +43,6 @@ enum X224_TPDU_TYPE
|
|||
#define TPDU_DISCONNECT_REQUEST_LENGTH (TPKT_HEADER_LENGTH + TPDU_DISCONNECT_REQUEST_HEADER_LENGTH)
|
||||
|
||||
FREERDP_LOCAL BOOL tpdu_read_header(wStream* s, BYTE* code, BYTE* li);
|
||||
FREERDP_LOCAL void tpdu_write_header(wStream* s, UINT16 length, BYTE code);
|
||||
FREERDP_LOCAL BOOL tpdu_read_connection_request(wStream* s, BYTE* li);
|
||||
FREERDP_LOCAL void tpdu_write_connection_request(wStream* s, UINT16 length);
|
||||
FREERDP_LOCAL BOOL tpdu_read_connection_confirm(wStream* s, BYTE* li);
|
||||
|
|
|
@ -550,7 +550,7 @@ static void transport_bio_error_log(rdpTransport* transport, LPCSTR biofunc, BIO
|
|||
}
|
||||
}
|
||||
|
||||
SSIZE_T transport_read_layer(rdpTransport* transport, BYTE* data, size_t bytes)
|
||||
static SSIZE_T transport_read_layer(rdpTransport* transport, BYTE* data, size_t bytes)
|
||||
{
|
||||
SSIZE_T read = 0;
|
||||
rdpRdp* rdp = transport->context->rdp;
|
||||
|
|
|
@ -864,7 +864,7 @@ static BOOL update_set_bounds(rdpContext* context, const rdpBounds* bounds)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL update_bounds_is_null(rdpBounds* bounds)
|
||||
static BOOL update_bounds_is_null(rdpBounds* bounds)
|
||||
{
|
||||
if ((bounds->left == 0) && (bounds->top == 0) && (bounds->right == 0) && (bounds->bottom == 0))
|
||||
return TRUE;
|
||||
|
@ -872,7 +872,7 @@ BOOL update_bounds_is_null(rdpBounds* bounds)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL update_bounds_equals(rdpBounds* bounds1, rdpBounds* bounds2)
|
||||
static BOOL update_bounds_equals(rdpBounds* bounds1, rdpBounds* bounds2)
|
||||
{
|
||||
if ((bounds1->left == bounds2->left) && (bounds1->top == bounds2->top) &&
|
||||
(bounds1->right == bounds2->right) && (bounds1->bottom == bounds2->bottom))
|
||||
|
@ -881,7 +881,7 @@ BOOL update_bounds_equals(rdpBounds* bounds1, rdpBounds* bounds2)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
int update_prepare_bounds(rdpContext* context, ORDER_INFO* orderInfo)
|
||||
static int update_prepare_bounds(rdpContext* context, ORDER_INFO* orderInfo)
|
||||
{
|
||||
int length = 0;
|
||||
rdpUpdate* update = context->update;
|
||||
|
@ -946,7 +946,8 @@ static int update_prepare_order_info(rdpContext* context, ORDER_INFO* orderInfo,
|
|||
return length;
|
||||
}
|
||||
|
||||
int update_write_order_info(rdpContext* context, wStream* s, ORDER_INFO* orderInfo, size_t offset)
|
||||
static int update_write_order_info(rdpContext* context, wStream* s, ORDER_INFO* orderInfo,
|
||||
size_t offset)
|
||||
{
|
||||
size_t position;
|
||||
WINPR_UNUSED(context);
|
||||
|
|
|
@ -70,7 +70,7 @@ static BOOL certificate_line_is_comment(const char* line, size_t length)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL certificate_store_init(rdpCertificateStore* certificate_store)
|
||||
static BOOL certificate_store_init(rdpCertificateStore* certificate_store)
|
||||
{
|
||||
char* server_path = NULL;
|
||||
rdpSettings* settings;
|
||||
|
|
|
@ -193,8 +193,8 @@ int crypto_rsa_private_decrypt(const BYTE* input, int length, UINT32 key_length,
|
|||
return crypto_rsa_private(input, length, key_length, modulus, private_exponent, output);
|
||||
}
|
||||
|
||||
int crypto_rsa_decrypt(const BYTE* input, int length, UINT32 key_length, const BYTE* modulus,
|
||||
const BYTE* private_exponent, BYTE* output)
|
||||
static int crypto_rsa_decrypt(const BYTE* input, int length, UINT32 key_length, const BYTE* modulus,
|
||||
const BYTE* private_exponent, BYTE* output)
|
||||
{
|
||||
return crypto_rsa_common(input, length, key_length, modulus, private_exponent, key_length,
|
||||
output);
|
||||
|
|
|
@ -77,7 +77,7 @@ int der_write_contextual_tag(wStream* s, BYTE tag, int length, BOOL pc)
|
|||
return der_write_length(s, length) + 1;
|
||||
}
|
||||
|
||||
void der_write_universal_tag(wStream* s, BYTE tag, BOOL pc)
|
||||
static void der_write_universal_tag(wStream* s, BYTE tag, BOOL pc)
|
||||
{
|
||||
Stream_Write_UINT8(s, (ER_CLASS_UNIV | ER_PC(pc)) | (ER_TAG_MASK & tag));
|
||||
}
|
||||
|
|
|
@ -373,7 +373,7 @@ void per_write_object_identifier(wStream* s, BYTE oid[6])
|
|||
* @param length string length
|
||||
*/
|
||||
|
||||
void per_write_string(wStream* s, BYTE* str, int length)
|
||||
static void per_write_string(wStream* s, BYTE* str, int length)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
|
@ -973,7 +973,8 @@ static BOOL gdi_frame_marker(rdpContext* context, const FRAME_MARKER_ORDER* fram
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL gdi_surface_frame_marker(rdpContext* context, const SURFACE_FRAME_MARKER* surfaceFrameMarker)
|
||||
static BOOL gdi_surface_frame_marker(rdpContext* context,
|
||||
const SURFACE_FRAME_MARKER* surfaceFrameMarker)
|
||||
{
|
||||
WLog_Print(context->gdi->log, WLOG_DEBUG, "frameId %" PRIu32 " frameAction %" PRIu32 "",
|
||||
surfaceFrameMarker->frameId, surfaceFrameMarker->frameAction);
|
||||
|
|
|
@ -61,7 +61,8 @@ int freerdp_detect_keyboard(DWORD* keyboardLayoutId)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int freerdp_keyboard_init_apple(DWORD* keyboardLayoutId, DWORD x11_keycode_to_rdp_scancode[256])
|
||||
static int freerdp_keyboard_init_apple(DWORD* keyboardLayoutId,
|
||||
DWORD x11_keycode_to_rdp_scancode[256])
|
||||
{
|
||||
DWORD vkcode;
|
||||
DWORD keycode;
|
||||
|
@ -79,7 +80,8 @@ int freerdp_keyboard_init_apple(DWORD* keyboardLayoutId, DWORD x11_keycode_to_rd
|
|||
return 0;
|
||||
}
|
||||
|
||||
int freerdp_keyboard_init_x11_evdev(DWORD* keyboardLayoutId, DWORD x11_keycode_to_rdp_scancode[256])
|
||||
static int freerdp_keyboard_init_x11_evdev(DWORD* keyboardLayoutId,
|
||||
DWORD x11_keycode_to_rdp_scancode[256])
|
||||
{
|
||||
DWORD vkcode;
|
||||
DWORD keycode;
|
||||
|
|
|
@ -146,7 +146,7 @@ int freerdp_detect_keyboard_layout_from_xkb(DWORD* keyboardLayoutId)
|
|||
return 0;
|
||||
}
|
||||
|
||||
char* freerdp_detect_keymap_from_xkb()
|
||||
static char* freerdp_detect_keymap_from_xkb(void)
|
||||
{
|
||||
char* pch;
|
||||
char* beg;
|
||||
|
|
|
@ -48,7 +48,7 @@ struct _XKB_KEY_NAME_SCANCODE
|
|||
};
|
||||
typedef struct _XKB_KEY_NAME_SCANCODE XKB_KEY_NAME_SCANCODE;
|
||||
|
||||
XKB_KEY_NAME_SCANCODE XKB_KEY_NAME_SCANCODE_TABLE[] = {
|
||||
static const XKB_KEY_NAME_SCANCODE XKB_KEY_NAME_SCANCODE_TABLE[] = {
|
||||
{ "AB00", RDP_SCANCODE_LSHIFT },
|
||||
{ "AB01", RDP_SCANCODE_KEY_Z }, // evdev 52
|
||||
{ "AB02", RDP_SCANCODE_KEY_X }, // evdev 53
|
||||
|
@ -310,7 +310,11 @@ XKB_KEY_NAME_SCANCODE XKB_KEY_NAME_SCANCODE_TABLE[] = {
|
|||
{ "XFER", RDP_SCANCODE_CONVERT_JP }, // JP alias of evdev 100 Henkan
|
||||
};
|
||||
|
||||
void* freerdp_keyboard_xkb_init()
|
||||
static int detect_keyboard_layout_from_xkbfile(void* display, DWORD* keyboardLayoutId);
|
||||
static int freerdp_keyboard_load_map_from_xkbfile(void* display,
|
||||
DWORD x11_keycode_to_rdp_scancode[256]);
|
||||
|
||||
static void* freerdp_keyboard_xkb_init(void)
|
||||
{
|
||||
int status;
|
||||
|
||||
|
|
|
@ -27,8 +27,4 @@
|
|||
FREERDP_LOCAL int freerdp_keyboard_init_xkbfile(DWORD* keyboardLayoutId,
|
||||
DWORD x11_keycode_to_rdp_scancode[256]);
|
||||
|
||||
FREERDP_LOCAL int detect_keyboard_layout_from_xkbfile(void* display, DWORD* keyboardLayoutId);
|
||||
FREERDP_LOCAL int freerdp_keyboard_load_map_from_xkbfile(void* display,
|
||||
DWORD x11_keycode_to_rdp_scancode[256]);
|
||||
|
||||
#endif /* FREERDP_LIB_LOCALE_KEYBOARD_XKB_H */
|
||||
|
|
|
@ -45,9 +45,9 @@ static primitives_t* generic = NULL;
|
|||
#ifdef WITH_SSE2
|
||||
#if !defined(WITH_IPP) || defined(ALL_PRIMITIVES_VERSIONS)
|
||||
|
||||
pstatus_t sse2_alphaComp_argb(const BYTE* pSrc1, UINT32 src1Step, const BYTE* pSrc2,
|
||||
UINT32 src2Step, BYTE* pDst, UINT32 dstStep, UINT32 width,
|
||||
UINT32 height)
|
||||
static pstatus_t sse2_alphaComp_argb(const BYTE* pSrc1, UINT32 src1Step, const BYTE* pSrc2,
|
||||
UINT32 src2Step, BYTE* pDst, UINT32 dstStep, UINT32 width,
|
||||
UINT32 height)
|
||||
{
|
||||
const UINT32* sptr1 = (const UINT32*)pSrc1;
|
||||
const UINT32* sptr2 = (const UINT32*)pSrc2;
|
||||
|
|
|
@ -196,252 +196,252 @@
|
|||
* SCD = Source, Constant, Destination
|
||||
* PRE = preload xmm0 with the constant.
|
||||
*/
|
||||
#define SSE3_SCD_PRE_ROUTINE(_name_, _type_, _fallback_, _op_, _slowWay_) \
|
||||
pstatus_t _name_(const _type_* pSrc, _type_ val, _type_* pDst, INT32 len) \
|
||||
{ \
|
||||
int shifts = 0; \
|
||||
UINT32 offBeatMask; \
|
||||
const _type_* sptr = pSrc; \
|
||||
_type_* dptr = pDst; \
|
||||
size_t count; \
|
||||
__m128i xmm0; \
|
||||
if (len < 16) /* pointless if too small */ \
|
||||
{ \
|
||||
return _fallback_(pSrc, val, pDst, len); \
|
||||
} \
|
||||
if (sizeof(_type_) == 1) \
|
||||
shifts = 1; \
|
||||
else if (sizeof(_type_) == 2) \
|
||||
shifts = 2; \
|
||||
else if (sizeof(_type_) == 4) \
|
||||
shifts = 3; \
|
||||
else if (sizeof(_type_) == 8) \
|
||||
shifts = 4; \
|
||||
offBeatMask = (1 << (shifts - 1)) - 1; \
|
||||
if ((ULONG_PTR)pDst & offBeatMask) \
|
||||
{ \
|
||||
/* Incrementing the pointer skips over 16-byte boundary. */ \
|
||||
return _fallback_(pSrc, val, pDst, len); \
|
||||
} \
|
||||
/* Get to the 16-byte boundary now. */ \
|
||||
while ((ULONG_PTR)dptr & 0x0f) \
|
||||
{ \
|
||||
_slowWay_; \
|
||||
if (--len == 0) \
|
||||
return PRIMITIVES_SUCCESS; \
|
||||
} \
|
||||
/* Use 4 128-bit SSE registers. */ \
|
||||
count = len >> (7 - shifts); \
|
||||
len -= count << (7 - shifts); \
|
||||
xmm0 = _mm_set1_epi32(val); \
|
||||
if ((ULONG_PTR)sptr & 0x0f) \
|
||||
{ \
|
||||
while (count--) \
|
||||
{ \
|
||||
__m128i xmm1, xmm2, xmm3, xmm4; \
|
||||
xmm1 = _mm_lddqu_si128((__m128i*)sptr); \
|
||||
sptr += (16 / sizeof(_type_)); \
|
||||
xmm2 = _mm_lddqu_si128((__m128i*)sptr); \
|
||||
sptr += (16 / sizeof(_type_)); \
|
||||
xmm3 = _mm_lddqu_si128((__m128i*)sptr); \
|
||||
sptr += (16 / sizeof(_type_)); \
|
||||
xmm4 = _mm_lddqu_si128((__m128i*)sptr); \
|
||||
sptr += (16 / sizeof(_type_)); \
|
||||
xmm1 = _op_(xmm1, xmm0); \
|
||||
xmm2 = _op_(xmm2, xmm0); \
|
||||
xmm3 = _op_(xmm3, xmm0); \
|
||||
xmm4 = _op_(xmm4, xmm0); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm1); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm2); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm3); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm4); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
} \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
while (count--) \
|
||||
{ \
|
||||
__m128i xmm1, xmm2, xmm3, xmm4; \
|
||||
xmm1 = _mm_load_si128((__m128i*)sptr); \
|
||||
sptr += (16 / sizeof(_type_)); \
|
||||
xmm2 = _mm_load_si128((__m128i*)sptr); \
|
||||
sptr += (16 / sizeof(_type_)); \
|
||||
xmm3 = _mm_load_si128((__m128i*)sptr); \
|
||||
sptr += (16 / sizeof(_type_)); \
|
||||
xmm4 = _mm_load_si128((__m128i*)sptr); \
|
||||
sptr += (16 / sizeof(_type_)); \
|
||||
xmm1 = _op_(xmm1, xmm0); \
|
||||
xmm2 = _op_(xmm2, xmm0); \
|
||||
xmm3 = _op_(xmm3, xmm0); \
|
||||
xmm4 = _op_(xmm4, xmm0); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm1); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm2); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm3); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm4); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
} \
|
||||
} \
|
||||
/* Use a single 128-bit SSE register. */ \
|
||||
count = len >> (5 - shifts); \
|
||||
len -= count << (5 - shifts); \
|
||||
while (count--) \
|
||||
{ \
|
||||
__m128i xmm1 = LOAD_SI128(sptr); \
|
||||
sptr += (16 / sizeof(_type_)); \
|
||||
xmm1 = _op_(xmm1, xmm0); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm1); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
} \
|
||||
/* Finish off the remainder. */ \
|
||||
while (len--) \
|
||||
{ \
|
||||
_slowWay_; \
|
||||
} \
|
||||
return PRIMITIVES_SUCCESS; \
|
||||
#define SSE3_SCD_PRE_ROUTINE(_name_, _type_, _fallback_, _op_, _slowWay_) \
|
||||
static pstatus_t _name_(const _type_* pSrc, _type_ val, _type_* pDst, INT32 len) \
|
||||
{ \
|
||||
int shifts = 0; \
|
||||
UINT32 offBeatMask; \
|
||||
const _type_* sptr = pSrc; \
|
||||
_type_* dptr = pDst; \
|
||||
size_t count; \
|
||||
__m128i xmm0; \
|
||||
if (len < 16) /* pointless if too small */ \
|
||||
{ \
|
||||
return _fallback_(pSrc, val, pDst, len); \
|
||||
} \
|
||||
if (sizeof(_type_) == 1) \
|
||||
shifts = 1; \
|
||||
else if (sizeof(_type_) == 2) \
|
||||
shifts = 2; \
|
||||
else if (sizeof(_type_) == 4) \
|
||||
shifts = 3; \
|
||||
else if (sizeof(_type_) == 8) \
|
||||
shifts = 4; \
|
||||
offBeatMask = (1 << (shifts - 1)) - 1; \
|
||||
if ((ULONG_PTR)pDst & offBeatMask) \
|
||||
{ \
|
||||
/* Incrementing the pointer skips over 16-byte boundary. */ \
|
||||
return _fallback_(pSrc, val, pDst, len); \
|
||||
} \
|
||||
/* Get to the 16-byte boundary now. */ \
|
||||
while ((ULONG_PTR)dptr & 0x0f) \
|
||||
{ \
|
||||
_slowWay_; \
|
||||
if (--len == 0) \
|
||||
return PRIMITIVES_SUCCESS; \
|
||||
} \
|
||||
/* Use 4 128-bit SSE registers. */ \
|
||||
count = len >> (7 - shifts); \
|
||||
len -= count << (7 - shifts); \
|
||||
xmm0 = _mm_set1_epi32(val); \
|
||||
if ((ULONG_PTR)sptr & 0x0f) \
|
||||
{ \
|
||||
while (count--) \
|
||||
{ \
|
||||
__m128i xmm1, xmm2, xmm3, xmm4; \
|
||||
xmm1 = _mm_lddqu_si128((__m128i*)sptr); \
|
||||
sptr += (16 / sizeof(_type_)); \
|
||||
xmm2 = _mm_lddqu_si128((__m128i*)sptr); \
|
||||
sptr += (16 / sizeof(_type_)); \
|
||||
xmm3 = _mm_lddqu_si128((__m128i*)sptr); \
|
||||
sptr += (16 / sizeof(_type_)); \
|
||||
xmm4 = _mm_lddqu_si128((__m128i*)sptr); \
|
||||
sptr += (16 / sizeof(_type_)); \
|
||||
xmm1 = _op_(xmm1, xmm0); \
|
||||
xmm2 = _op_(xmm2, xmm0); \
|
||||
xmm3 = _op_(xmm3, xmm0); \
|
||||
xmm4 = _op_(xmm4, xmm0); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm1); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm2); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm3); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm4); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
} \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
while (count--) \
|
||||
{ \
|
||||
__m128i xmm1, xmm2, xmm3, xmm4; \
|
||||
xmm1 = _mm_load_si128((__m128i*)sptr); \
|
||||
sptr += (16 / sizeof(_type_)); \
|
||||
xmm2 = _mm_load_si128((__m128i*)sptr); \
|
||||
sptr += (16 / sizeof(_type_)); \
|
||||
xmm3 = _mm_load_si128((__m128i*)sptr); \
|
||||
sptr += (16 / sizeof(_type_)); \
|
||||
xmm4 = _mm_load_si128((__m128i*)sptr); \
|
||||
sptr += (16 / sizeof(_type_)); \
|
||||
xmm1 = _op_(xmm1, xmm0); \
|
||||
xmm2 = _op_(xmm2, xmm0); \
|
||||
xmm3 = _op_(xmm3, xmm0); \
|
||||
xmm4 = _op_(xmm4, xmm0); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm1); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm2); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm3); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm4); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
} \
|
||||
} \
|
||||
/* Use a single 128-bit SSE register. */ \
|
||||
count = len >> (5 - shifts); \
|
||||
len -= count << (5 - shifts); \
|
||||
while (count--) \
|
||||
{ \
|
||||
__m128i xmm1 = LOAD_SI128(sptr); \
|
||||
sptr += (16 / sizeof(_type_)); \
|
||||
xmm1 = _op_(xmm1, xmm0); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm1); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
} \
|
||||
/* Finish off the remainder. */ \
|
||||
while (len--) \
|
||||
{ \
|
||||
_slowWay_; \
|
||||
} \
|
||||
return PRIMITIVES_SUCCESS; \
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* SSD = Source1, Source2, Destination
|
||||
*/
|
||||
#define SSE3_SSD_ROUTINE(_name_, _type_, _fallback_, _op_, _slowWay_) \
|
||||
pstatus_t _name_(const _type_* pSrc1, const _type_* pSrc2, _type_* pDst, UINT32 len) \
|
||||
{ \
|
||||
int shifts = 0; \
|
||||
UINT32 offBeatMask; \
|
||||
const _type_* sptr1 = pSrc1; \
|
||||
const _type_* sptr2 = pSrc2; \
|
||||
_type_* dptr = pDst; \
|
||||
size_t count; \
|
||||
if (len < 16) /* pointless if too small */ \
|
||||
{ \
|
||||
return _fallback_(pSrc1, pSrc2, pDst, len); \
|
||||
} \
|
||||
if (sizeof(_type_) == 1) \
|
||||
shifts = 1; \
|
||||
else if (sizeof(_type_) == 2) \
|
||||
shifts = 2; \
|
||||
else if (sizeof(_type_) == 4) \
|
||||
shifts = 3; \
|
||||
else if (sizeof(_type_) == 8) \
|
||||
shifts = 4; \
|
||||
offBeatMask = (1 << (shifts - 1)) - 1; \
|
||||
if ((ULONG_PTR)pDst & offBeatMask) \
|
||||
{ \
|
||||
/* Incrementing the pointer skips over 16-byte boundary. */ \
|
||||
return _fallback_(pSrc1, pSrc2, pDst, len); \
|
||||
} \
|
||||
/* Get to the 16-byte boundary now. */ \
|
||||
while ((ULONG_PTR)dptr & 0x0f) \
|
||||
{ \
|
||||
pstatus_t status; \
|
||||
status = _slowWay_; \
|
||||
if (status != PRIMITIVES_SUCCESS) \
|
||||
return status; \
|
||||
if (--len == 0) \
|
||||
return PRIMITIVES_SUCCESS; \
|
||||
} \
|
||||
/* Use 4 128-bit SSE registers. */ \
|
||||
count = len >> (7 - shifts); \
|
||||
len -= count << (7 - shifts); \
|
||||
if (((ULONG_PTR)sptr1 & 0x0f) || ((ULONG_PTR)sptr2 & 0x0f)) \
|
||||
{ \
|
||||
/* Unaligned loads */ \
|
||||
while (count--) \
|
||||
{ \
|
||||
__m128i xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7; \
|
||||
xmm0 = _mm_lddqu_si128((__m128i*)sptr1); \
|
||||
sptr1 += (16 / sizeof(_type_)); \
|
||||
xmm1 = _mm_lddqu_si128((__m128i*)sptr1); \
|
||||
sptr1 += (16 / sizeof(_type_)); \
|
||||
xmm2 = _mm_lddqu_si128((__m128i*)sptr1); \
|
||||
sptr1 += (16 / sizeof(_type_)); \
|
||||
xmm3 = _mm_lddqu_si128((__m128i*)sptr1); \
|
||||
sptr1 += (16 / sizeof(_type_)); \
|
||||
xmm4 = _mm_lddqu_si128((__m128i*)sptr2); \
|
||||
sptr2 += (16 / sizeof(_type_)); \
|
||||
xmm5 = _mm_lddqu_si128((__m128i*)sptr2); \
|
||||
sptr2 += (16 / sizeof(_type_)); \
|
||||
xmm6 = _mm_lddqu_si128((__m128i*)sptr2); \
|
||||
sptr2 += (16 / sizeof(_type_)); \
|
||||
xmm7 = _mm_lddqu_si128((__m128i*)sptr2); \
|
||||
sptr2 += (16 / sizeof(_type_)); \
|
||||
xmm0 = _op_(xmm0, xmm4); \
|
||||
xmm1 = _op_(xmm1, xmm5); \
|
||||
xmm2 = _op_(xmm2, xmm6); \
|
||||
xmm3 = _op_(xmm3, xmm7); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm0); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm1); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm2); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm3); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
} \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
/* Aligned loads */ \
|
||||
while (count--) \
|
||||
{ \
|
||||
__m128i xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7; \
|
||||
xmm0 = _mm_load_si128((__m128i*)sptr1); \
|
||||
sptr1 += (16 / sizeof(_type_)); \
|
||||
xmm1 = _mm_load_si128((__m128i*)sptr1); \
|
||||
sptr1 += (16 / sizeof(_type_)); \
|
||||
xmm2 = _mm_load_si128((__m128i*)sptr1); \
|
||||
sptr1 += (16 / sizeof(_type_)); \
|
||||
xmm3 = _mm_load_si128((__m128i*)sptr1); \
|
||||
sptr1 += (16 / sizeof(_type_)); \
|
||||
xmm4 = _mm_load_si128((__m128i*)sptr2); \
|
||||
sptr2 += (16 / sizeof(_type_)); \
|
||||
xmm5 = _mm_load_si128((__m128i*)sptr2); \
|
||||
sptr2 += (16 / sizeof(_type_)); \
|
||||
xmm6 = _mm_load_si128((__m128i*)sptr2); \
|
||||
sptr2 += (16 / sizeof(_type_)); \
|
||||
xmm7 = _mm_load_si128((__m128i*)sptr2); \
|
||||
sptr2 += (16 / sizeof(_type_)); \
|
||||
xmm0 = _op_(xmm0, xmm4); \
|
||||
xmm1 = _op_(xmm1, xmm5); \
|
||||
xmm2 = _op_(xmm2, xmm6); \
|
||||
xmm3 = _op_(xmm3, xmm7); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm0); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm1); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm2); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm3); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
} \
|
||||
} \
|
||||
/* Use a single 128-bit SSE register. */ \
|
||||
count = len >> (5 - shifts); \
|
||||
len -= count << (5 - shifts); \
|
||||
while (count--) \
|
||||
{ \
|
||||
__m128i xmm0, xmm1; \
|
||||
xmm0 = LOAD_SI128(sptr1); \
|
||||
sptr1 += (16 / sizeof(_type_)); \
|
||||
xmm1 = LOAD_SI128(sptr2); \
|
||||
sptr2 += (16 / sizeof(_type_)); \
|
||||
xmm0 = _op_(xmm0, xmm1); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm0); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
} \
|
||||
/* Finish off the remainder. */ \
|
||||
while (len--) \
|
||||
{ \
|
||||
_slowWay_; \
|
||||
} \
|
||||
return PRIMITIVES_SUCCESS; \
|
||||
#define SSE3_SSD_ROUTINE(_name_, _type_, _fallback_, _op_, _slowWay_) \
|
||||
static pstatus_t _name_(const _type_* pSrc1, const _type_* pSrc2, _type_* pDst, UINT32 len) \
|
||||
{ \
|
||||
int shifts = 0; \
|
||||
UINT32 offBeatMask; \
|
||||
const _type_* sptr1 = pSrc1; \
|
||||
const _type_* sptr2 = pSrc2; \
|
||||
_type_* dptr = pDst; \
|
||||
size_t count; \
|
||||
if (len < 16) /* pointless if too small */ \
|
||||
{ \
|
||||
return _fallback_(pSrc1, pSrc2, pDst, len); \
|
||||
} \
|
||||
if (sizeof(_type_) == 1) \
|
||||
shifts = 1; \
|
||||
else if (sizeof(_type_) == 2) \
|
||||
shifts = 2; \
|
||||
else if (sizeof(_type_) == 4) \
|
||||
shifts = 3; \
|
||||
else if (sizeof(_type_) == 8) \
|
||||
shifts = 4; \
|
||||
offBeatMask = (1 << (shifts - 1)) - 1; \
|
||||
if ((ULONG_PTR)pDst & offBeatMask) \
|
||||
{ \
|
||||
/* Incrementing the pointer skips over 16-byte boundary. */ \
|
||||
return _fallback_(pSrc1, pSrc2, pDst, len); \
|
||||
} \
|
||||
/* Get to the 16-byte boundary now. */ \
|
||||
while ((ULONG_PTR)dptr & 0x0f) \
|
||||
{ \
|
||||
pstatus_t status; \
|
||||
status = _slowWay_; \
|
||||
if (status != PRIMITIVES_SUCCESS) \
|
||||
return status; \
|
||||
if (--len == 0) \
|
||||
return PRIMITIVES_SUCCESS; \
|
||||
} \
|
||||
/* Use 4 128-bit SSE registers. */ \
|
||||
count = len >> (7 - shifts); \
|
||||
len -= count << (7 - shifts); \
|
||||
if (((ULONG_PTR)sptr1 & 0x0f) || ((ULONG_PTR)sptr2 & 0x0f)) \
|
||||
{ \
|
||||
/* Unaligned loads */ \
|
||||
while (count--) \
|
||||
{ \
|
||||
__m128i xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7; \
|
||||
xmm0 = _mm_lddqu_si128((__m128i*)sptr1); \
|
||||
sptr1 += (16 / sizeof(_type_)); \
|
||||
xmm1 = _mm_lddqu_si128((__m128i*)sptr1); \
|
||||
sptr1 += (16 / sizeof(_type_)); \
|
||||
xmm2 = _mm_lddqu_si128((__m128i*)sptr1); \
|
||||
sptr1 += (16 / sizeof(_type_)); \
|
||||
xmm3 = _mm_lddqu_si128((__m128i*)sptr1); \
|
||||
sptr1 += (16 / sizeof(_type_)); \
|
||||
xmm4 = _mm_lddqu_si128((__m128i*)sptr2); \
|
||||
sptr2 += (16 / sizeof(_type_)); \
|
||||
xmm5 = _mm_lddqu_si128((__m128i*)sptr2); \
|
||||
sptr2 += (16 / sizeof(_type_)); \
|
||||
xmm6 = _mm_lddqu_si128((__m128i*)sptr2); \
|
||||
sptr2 += (16 / sizeof(_type_)); \
|
||||
xmm7 = _mm_lddqu_si128((__m128i*)sptr2); \
|
||||
sptr2 += (16 / sizeof(_type_)); \
|
||||
xmm0 = _op_(xmm0, xmm4); \
|
||||
xmm1 = _op_(xmm1, xmm5); \
|
||||
xmm2 = _op_(xmm2, xmm6); \
|
||||
xmm3 = _op_(xmm3, xmm7); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm0); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm1); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm2); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm3); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
} \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
/* Aligned loads */ \
|
||||
while (count--) \
|
||||
{ \
|
||||
__m128i xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7; \
|
||||
xmm0 = _mm_load_si128((__m128i*)sptr1); \
|
||||
sptr1 += (16 / sizeof(_type_)); \
|
||||
xmm1 = _mm_load_si128((__m128i*)sptr1); \
|
||||
sptr1 += (16 / sizeof(_type_)); \
|
||||
xmm2 = _mm_load_si128((__m128i*)sptr1); \
|
||||
sptr1 += (16 / sizeof(_type_)); \
|
||||
xmm3 = _mm_load_si128((__m128i*)sptr1); \
|
||||
sptr1 += (16 / sizeof(_type_)); \
|
||||
xmm4 = _mm_load_si128((__m128i*)sptr2); \
|
||||
sptr2 += (16 / sizeof(_type_)); \
|
||||
xmm5 = _mm_load_si128((__m128i*)sptr2); \
|
||||
sptr2 += (16 / sizeof(_type_)); \
|
||||
xmm6 = _mm_load_si128((__m128i*)sptr2); \
|
||||
sptr2 += (16 / sizeof(_type_)); \
|
||||
xmm7 = _mm_load_si128((__m128i*)sptr2); \
|
||||
sptr2 += (16 / sizeof(_type_)); \
|
||||
xmm0 = _op_(xmm0, xmm4); \
|
||||
xmm1 = _op_(xmm1, xmm5); \
|
||||
xmm2 = _op_(xmm2, xmm6); \
|
||||
xmm3 = _op_(xmm3, xmm7); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm0); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm1); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm2); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm3); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
} \
|
||||
} \
|
||||
/* Use a single 128-bit SSE register. */ \
|
||||
count = len >> (5 - shifts); \
|
||||
len -= count << (5 - shifts); \
|
||||
while (count--) \
|
||||
{ \
|
||||
__m128i xmm0, xmm1; \
|
||||
xmm0 = LOAD_SI128(sptr1); \
|
||||
sptr1 += (16 / sizeof(_type_)); \
|
||||
xmm1 = LOAD_SI128(sptr2); \
|
||||
sptr2 += (16 / sizeof(_type_)); \
|
||||
xmm0 = _op_(xmm0, xmm1); \
|
||||
_mm_store_si128((__m128i*)dptr, xmm0); \
|
||||
dptr += (16 / sizeof(_type_)); \
|
||||
} \
|
||||
/* Finish off the remainder. */ \
|
||||
while (len--) \
|
||||
{ \
|
||||
_slowWay_; \
|
||||
} \
|
||||
return PRIMITIVES_SUCCESS; \
|
||||
}
|
||||
|
||||
#endif /* FREERDP_LIB_PRIM_TEMPLATES_H */
|
||||
|
|
|
@ -32,7 +32,7 @@ LARGE_INTEGER stopwatch_freq = { 0, 0 };
|
|||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
void stopwatch_set_time(UINT64* usecs)
|
||||
static void stopwatch_set_time(UINT64* usecs)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
LARGE_INTEGER perfcount;
|
||||
|
@ -45,7 +45,7 @@ void stopwatch_set_time(UINT64* usecs)
|
|||
#endif
|
||||
}
|
||||
|
||||
STOPWATCH* stopwatch_create()
|
||||
STOPWATCH* stopwatch_create(void)
|
||||
{
|
||||
STOPWATCH* sw;
|
||||
#ifdef _WIN32
|
||||
|
|
|
@ -26,8 +26,9 @@
|
|||
|
||||
#include "rdtk_nine_patch.h"
|
||||
|
||||
int rdtk_image_copy_alpha_blend(BYTE* pDstData, int nDstStep, int nXDst, int nYDst, int nWidth,
|
||||
int nHeight, BYTE* pSrcData, int nSrcStep, int nXSrc, int nYSrc)
|
||||
static int rdtk_image_copy_alpha_blend(BYTE* pDstData, int nDstStep, int nXDst, int nYDst,
|
||||
int nWidth, int nHeight, BYTE* pSrcData, int nSrcStep,
|
||||
int nXSrc, int nYSrc)
|
||||
{
|
||||
int x, y;
|
||||
BYTE A, R, G, B;
|
||||
|
|
|
@ -1483,7 +1483,7 @@ static BOOL shadow_client_send_resize(rdpShadowClient* client, SHADOW_GFX_STATUS
|
|||
*
|
||||
* @return TRUE on success
|
||||
*/
|
||||
BOOL shadow_client_surface_update(rdpShadowClient* client, REGION16* region)
|
||||
static BOOL shadow_client_surface_update(rdpShadowClient* client, REGION16* region)
|
||||
{
|
||||
UINT32 numRects = 0;
|
||||
const RECTANGLE_16* rects;
|
||||
|
|
|
@ -26,7 +26,6 @@ extern "C"
|
|||
{
|
||||
#endif
|
||||
|
||||
BOOL shadow_client_surface_update(rdpShadowClient* client, REGION16* region);
|
||||
BOOL shadow_client_accepted(freerdp_listener* instance, freerdp_peer* client);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -26,13 +26,27 @@
|
|||
|
||||
#define TAG SERVER_TAG("shadow.mcevent")
|
||||
|
||||
struct rdp_shadow_multiclient_event
|
||||
{
|
||||
HANDLE event; /* Kickoff event */
|
||||
HANDLE barrierEvent; /* Represents that all clients have consumed event */
|
||||
HANDLE doneEvent; /* Event handling finished. Server could continue */
|
||||
wArrayList* subscribers;
|
||||
CRITICAL_SECTION lock;
|
||||
int consuming;
|
||||
int waiting;
|
||||
|
||||
/* For debug */
|
||||
int eventid;
|
||||
};
|
||||
|
||||
struct rdp_shadow_multiclient_subscriber
|
||||
{
|
||||
rdpShadowMultiClientEvent* ref;
|
||||
BOOL pleaseHandle; /* Indicate if server expects my handling in this turn */
|
||||
};
|
||||
|
||||
rdpShadowMultiClientEvent* shadow_multiclient_new()
|
||||
rdpShadowMultiClientEvent* shadow_multiclient_new(void)
|
||||
{
|
||||
rdpShadowMultiClientEvent* event =
|
||||
(rdpShadowMultiClientEvent*)calloc(1, sizeof(rdpShadowMultiClientEvent));
|
||||
|
|
|
@ -30,26 +30,13 @@
|
|||
* by multiple clients. All clients should wait others before continue
|
||||
* Server should wait for all clients before continue
|
||||
*/
|
||||
struct rdp_shadow_multiclient_event
|
||||
{
|
||||
HANDLE event; /* Kickoff event */
|
||||
HANDLE barrierEvent; /* Represents that all clients have consumed event */
|
||||
HANDLE doneEvent; /* Event handling finished. Server could continue */
|
||||
wArrayList* subscribers;
|
||||
CRITICAL_SECTION lock;
|
||||
int consuming;
|
||||
int waiting;
|
||||
|
||||
/* For debug */
|
||||
int eventid;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
rdpShadowMultiClientEvent* shadow_multiclient_new();
|
||||
rdpShadowMultiClientEvent* shadow_multiclient_new(void);
|
||||
void shadow_multiclient_free(rdpShadowMultiClientEvent* event);
|
||||
void shadow_multiclient_publish(rdpShadowMultiClientEvent* event);
|
||||
void shadow_multiclient_wait(rdpShadowMultiClientEvent* event);
|
||||
|
|
|
@ -126,7 +126,7 @@ static void UwacRegisterDeviceListener(UwacSeat* s)
|
|||
wl_data_device_add_listener(s->data_device, &data_device_listener, s);
|
||||
}
|
||||
|
||||
UwacReturnCode UwacCreateDataSource(UwacSeat* s)
|
||||
static UwacReturnCode UwacCreateDataSource(UwacSeat* s)
|
||||
{
|
||||
if (!s)
|
||||
return UWAC_ERROR_INTERNAL;
|
||||
|
|
|
@ -49,7 +49,8 @@ static const char* event_names[] = {
|
|||
"touch cancel", "touch frame end", "frame done", "close", NULL
|
||||
};
|
||||
|
||||
bool uwac_default_error_handler(UwacDisplay* display, UwacReturnCode code, const char* msg, ...)
|
||||
static bool uwac_default_error_handler(UwacDisplay* display, UwacReturnCode code, const char* msg,
|
||||
...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, msg);
|
||||
|
@ -298,15 +299,15 @@ static void registry_handle_global_remove(void* data, struct wl_registry* regist
|
|||
}
|
||||
}
|
||||
|
||||
void UwacDestroyGlobal(UwacGlobal* global)
|
||||
static void UwacDestroyGlobal(UwacGlobal* global)
|
||||
{
|
||||
free(global->interface);
|
||||
wl_list_remove(&global->link);
|
||||
free(global);
|
||||
}
|
||||
|
||||
void* display_bind(UwacDisplay* display, uint32_t name, const struct wl_interface* interface,
|
||||
uint32_t version)
|
||||
static void* display_bind(UwacDisplay* display, uint32_t name, const struct wl_interface* interface,
|
||||
uint32_t version)
|
||||
{
|
||||
return wl_registry_bind(display->registry, name, interface, version);
|
||||
}
|
||||
|
@ -322,7 +323,7 @@ int UwacDisplayWatchFd(UwacDisplay* display, int fd, uint32_t events, UwacTask*
|
|||
return epoll_ctl(display->epoll_fd, EPOLL_CTL_ADD, fd, &ep);
|
||||
}
|
||||
|
||||
void UwacDisplayUnwatchFd(UwacDisplay* display, int fd)
|
||||
static void UwacDisplayUnwatchFd(UwacDisplay* display, int fd)
|
||||
{
|
||||
epoll_ctl(display->epoll_fd, EPOLL_CTL_DEL, fd, NULL);
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
* This part is an adaptation of client/window.c from the weston project.
|
||||
*/
|
||||
|
||||
void* fail_on_null(void* p)
|
||||
static void* fail_on_null(void* p)
|
||||
{
|
||||
if (p == NULL)
|
||||
{
|
||||
|
|
|
@ -52,7 +52,7 @@ static void buffer_release(void* data, struct wl_buffer* buffer)
|
|||
|
||||
static const struct wl_buffer_listener buffer_listener = { buffer_release };
|
||||
|
||||
void UwacWindowDestroyBuffers(UwacWindow* w)
|
||||
static void UwacWindowDestroyBuffers(UwacWindow* w)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -72,8 +72,8 @@ void UwacWindowDestroyBuffers(UwacWindow* w)
|
|||
w->buffers = NULL;
|
||||
}
|
||||
|
||||
int UwacWindowShmAllocBuffers(UwacWindow* w, int nbuffers, int allocSize, uint32_t width,
|
||||
uint32_t height, enum wl_shm_format format);
|
||||
static int UwacWindowShmAllocBuffers(UwacWindow* w, int nbuffers, int allocSize, uint32_t width,
|
||||
uint32_t height, enum wl_shm_format format);
|
||||
|
||||
static void xdg_handle_toplevel_configure(void* data, struct xdg_toplevel* xdg_toplevel,
|
||||
int32_t width, int32_t height, struct wl_array* states)
|
||||
|
@ -238,13 +238,13 @@ static const struct ivi_surface_listener ivi_surface_listener = {
|
|||
};
|
||||
#endif
|
||||
|
||||
void shell_ping(void* data, struct wl_shell_surface* surface, uint32_t serial)
|
||||
static void shell_ping(void* data, struct wl_shell_surface* surface, uint32_t serial)
|
||||
{
|
||||
wl_shell_surface_pong(surface, serial);
|
||||
}
|
||||
|
||||
void shell_configure(void* data, struct wl_shell_surface* surface, uint32_t edges, int32_t width,
|
||||
int32_t height)
|
||||
static void shell_configure(void* data, struct wl_shell_surface* surface, uint32_t edges,
|
||||
int32_t width, int32_t height)
|
||||
{
|
||||
UwacWindow* window = (UwacWindow*)data;
|
||||
UwacConfigureEvent* event;
|
||||
|
@ -291,7 +291,7 @@ void shell_configure(void* data, struct wl_shell_surface* surface, uint32_t edge
|
|||
}
|
||||
}
|
||||
|
||||
void shell_popup_done(void* data, struct wl_shell_surface* surface)
|
||||
static void shell_popup_done(void* data, struct wl_shell_surface* surface)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -358,7 +358,7 @@ error_mmap:
|
|||
return ret;
|
||||
}
|
||||
|
||||
UwacBuffer* UwacWindowFindFreeBuffer(UwacWindow* w)
|
||||
static UwacBuffer* UwacWindowFindFreeBuffer(UwacWindow* w)
|
||||
{
|
||||
int i, ret;
|
||||
|
||||
|
|
|
@ -118,22 +118,6 @@ extern "C"
|
|||
#define OpenEvent OpenEventA
|
||||
#endif
|
||||
|
||||
/* Slim Reader/Writer (SRW) Lock */
|
||||
|
||||
typedef PVOID RTL_SRWLOCK;
|
||||
typedef RTL_SRWLOCK SRWLOCK, *PSRWLOCK;
|
||||
|
||||
WINPR_API VOID InitializeSRWLock(PSRWLOCK SRWLock);
|
||||
|
||||
WINPR_API VOID AcquireSRWLockExclusive(PSRWLOCK SRWLock);
|
||||
WINPR_API VOID AcquireSRWLockShared(PSRWLOCK SRWLock);
|
||||
|
||||
WINPR_API BOOL TryAcquireSRWLockExclusive(PSRWLOCK SRWLock);
|
||||
WINPR_API BOOL TryAcquireSRWLockShared(PSRWLOCK SRWLock);
|
||||
|
||||
WINPR_API VOID ReleaseSRWLockExclusive(PSRWLOCK SRWLock);
|
||||
WINPR_API VOID ReleaseSRWLockShared(PSRWLOCK SRWLock);
|
||||
|
||||
/* Condition Variable */
|
||||
|
||||
typedef PVOID RTL_CONDITION_VARIABLE;
|
||||
|
|
|
@ -291,14 +291,19 @@ extern "C"
|
|||
|
||||
#define MAX_COMPUTERNAME_LENGTH 31
|
||||
|
||||
WINPR_API BOOL GetComputerNameA(LPSTR lpBuffer, LPDWORD lpnSize);
|
||||
WINPR_API BOOL GetComputerNameW(LPWSTR lpBuffer, LPDWORD lpnSize);
|
||||
|
||||
WINPR_API BOOL GetComputerNameExA(COMPUTER_NAME_FORMAT NameType, LPSTR lpBuffer,
|
||||
LPDWORD lpnSize);
|
||||
WINPR_API BOOL GetComputerNameExW(COMPUTER_NAME_FORMAT NameType, LPWSTR lpBuffer,
|
||||
LPDWORD lpnSize);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define GetComputerName GetComputerNameW
|
||||
#define GetComputerNameEx GetComputerNameExW
|
||||
#else
|
||||
#define GetComputerName GetComputerNameA
|
||||
#define GetComputerNameEx GetComputerNameExA
|
||||
#endif
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ endif()
|
|||
# Level "1" API as defined for MinCore.lib
|
||||
set(WINPR_CORE synch locale library file comm pipe interlocked security
|
||||
environment crypto registry credentials path io memory input shell
|
||||
heap utils error com timezone sysinfo pool handle thread)
|
||||
heap utils error timezone sysinfo pool handle thread)
|
||||
|
||||
foreach(DIR ${WINPR_CORE})
|
||||
add_subdirectory(${DIR})
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
* http://www.w3.org/TR/clipboard-apis/
|
||||
*/
|
||||
|
||||
const char* CF_STANDARD_STRINGS[CF_MAX] = {
|
||||
static const char* CF_STANDARD_STRINGS[CF_MAX] = {
|
||||
"CF_RAW", /* 0 */
|
||||
"CF_TEXT", /* 1 */
|
||||
"CF_BITMAP", /* 2 */
|
||||
|
@ -65,7 +65,8 @@ const char* CF_STANDARD_STRINGS[CF_MAX] = {
|
|||
"CF_DIBV5" /* 17 */
|
||||
};
|
||||
|
||||
wClipboardFormat* ClipboardFindFormat(wClipboard* clipboard, UINT32 formatId, const char* name)
|
||||
static wClipboardFormat* ClipboardFindFormat(wClipboard* clipboard, UINT32 formatId,
|
||||
const char* name)
|
||||
{
|
||||
UINT32 index;
|
||||
wClipboardFormat* format = NULL;
|
||||
|
@ -113,7 +114,7 @@ wClipboardFormat* ClipboardFindFormat(wClipboard* clipboard, UINT32 formatId, co
|
|||
return format;
|
||||
}
|
||||
|
||||
wClipboardSynthesizer* ClipboardFindSynthesizer(wClipboardFormat* format, UINT32 formatId)
|
||||
static wClipboardSynthesizer* ClipboardFindSynthesizer(wClipboardFormat* format, UINT32 formatId)
|
||||
{
|
||||
UINT32 index;
|
||||
wClipboardSynthesizer* synthesizer;
|
||||
|
@ -354,7 +355,7 @@ UINT32 ClipboardGetFormatIds(wClipboard* clipboard, UINT32** ppFormatIds)
|
|||
return count;
|
||||
}
|
||||
|
||||
BOOL ClipboardInitFormats(wClipboard* clipboard)
|
||||
static BOOL ClipboardInitFormats(wClipboard* clipboard)
|
||||
{
|
||||
UINT32 formatId = 0;
|
||||
wClipboardFormat* format;
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
# WinPR: Windows Portable Runtime
|
||||
# libwinpr-com cmake build script
|
||||
#
|
||||
# Copyright 2013 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
winpr_module_add(com.c)
|
||||
|
||||
if(BUILD_TESTING)
|
||||
add_subdirectory(test)
|
||||
endif()
|
|
@ -1,9 +0,0 @@
|
|||
|
||||
set(MINWIN_LAYER "1")
|
||||
set(MINWIN_GROUP "core")
|
||||
set(MINWIN_MAJOR_VERSION "1")
|
||||
set(MINWIN_MINOR_VERSION "0")
|
||||
set(MINWIN_SHORT_NAME "com")
|
||||
set(MINWIN_LONG_NAME "Component Object Model (COM)")
|
||||
set(MODULE_LIBRARY_NAME "api-ms-win-${MINWIN_GROUP}-${MINWIN_SHORT_NAME}-l${MINWIN_LAYER}-${MINWIN_MAJOR_VERSION}-${MINWIN_MINOR_VERSION}")
|
||||
|
|
@ -1,123 +0,0 @@
|
|||
/**
|
||||
* WinPR: Windows Portable Runtime
|
||||
* Component Object Model (COM)
|
||||
*
|
||||
* Copyright 2013 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <winpr/crt.h>
|
||||
#include <winpr/error.h>
|
||||
|
||||
/**
|
||||
* api-ms-win-core-com-l1-1-0.dll:
|
||||
*
|
||||
* CLSIDFromProgID
|
||||
* CLSIDFromString
|
||||
* CoAddRefServerProcess
|
||||
* CoAllowUnmarshalerCLSID
|
||||
* CoCancelCall
|
||||
* CoCopyProxy
|
||||
* CoCreateFreeThreadedMarshaler
|
||||
* CoCreateGuid
|
||||
* CoCreateInstance
|
||||
* CoCreateInstanceEx
|
||||
* CoCreateInstanceFromApp
|
||||
* CoDecodeProxy
|
||||
* CoDecrementMTAUsage
|
||||
* CoDisableCallCancellation
|
||||
* CoDisconnectContext
|
||||
* CoDisconnectObject
|
||||
* CoEnableCallCancellation
|
||||
* CoFreeUnusedLibraries
|
||||
* CoFreeUnusedLibrariesEx
|
||||
* CoGetApartmentType
|
||||
* CoGetCallContext
|
||||
* CoGetCallerTID
|
||||
* CoGetCancelObject
|
||||
* CoGetClassObject
|
||||
* CoGetContextToken
|
||||
* CoGetCurrentLogicalThreadId
|
||||
* CoGetCurrentProcess
|
||||
* CoGetDefaultContext
|
||||
* CoGetInterfaceAndReleaseStream
|
||||
* CoGetMalloc
|
||||
* CoGetMarshalSizeMax
|
||||
* CoGetObjectContext
|
||||
* CoGetPSClsid
|
||||
* CoGetStandardMarshal
|
||||
* CoGetStdMarshalEx
|
||||
* CoGetTreatAsClass
|
||||
* CoImpersonateClient
|
||||
* CoIncrementMTAUsage
|
||||
* CoInitializeEx
|
||||
* CoInitializeSecurity
|
||||
* CoInvalidateRemoteMachineBindings
|
||||
* CoIsHandlerConnected
|
||||
* CoLockObjectExternal
|
||||
* CoMarshalHresult
|
||||
* CoMarshalInterface
|
||||
* CoMarshalInterThreadInterfaceInStream
|
||||
* CoQueryAuthenticationServices
|
||||
* CoQueryClientBlanket
|
||||
* CoQueryProxyBlanket
|
||||
* CoRegisterClassObject
|
||||
* CoRegisterPSClsid
|
||||
* CoRegisterSurrogate
|
||||
* CoReleaseMarshalData
|
||||
* CoReleaseServerProcess
|
||||
* CoResumeClassObjects
|
||||
* CoRevertToSelf
|
||||
* CoRevokeClassObject
|
||||
* CoSetCancelObject
|
||||
* CoSetProxyBlanket
|
||||
* CoSuspendClassObjects
|
||||
* CoSwitchCallContext
|
||||
* CoTaskMemAlloc
|
||||
* CoTaskMemFree
|
||||
* CoTaskMemRealloc
|
||||
* CoTestCancel
|
||||
* CoUninitialize
|
||||
* CoUnmarshalHresult
|
||||
* CoUnmarshalInterface
|
||||
* CoWaitForMultipleHandles
|
||||
* CoWaitForMultipleObjects
|
||||
* CreateStreamOnHGlobal
|
||||
* FreePropVariantArray
|
||||
* GetHGlobalFromStream
|
||||
* IIDFromString
|
||||
* ProgIDFromCLSID
|
||||
* PropVariantClear
|
||||
* PropVariantCopy
|
||||
* StringFromCLSID
|
||||
* StringFromGUID2
|
||||
* StringFromIID
|
||||
*/
|
||||
|
||||
#ifndef _WIN32
|
||||
|
||||
HRESULT CoInitializeEx(LPVOID pvReserved, DWORD dwCoInit)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CoUninitialize(void)
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,3 +0,0 @@
|
|||
TestCom
|
||||
TestCom.c
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
set(MODULE_NAME "TestCom")
|
||||
set(MODULE_PREFIX "TEST_COM")
|
||||
|
||||
set(${MODULE_PREFIX}_DRIVER ${MODULE_NAME}.c)
|
||||
|
||||
set(${MODULE_PREFIX}_TESTS
|
||||
TestComReference.c)
|
||||
|
||||
create_test_sourcelist(${MODULE_PREFIX}_SRCS
|
||||
${${MODULE_PREFIX}_DRIVER}
|
||||
${${MODULE_PREFIX}_TESTS})
|
||||
|
||||
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
||||
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${TESTING_OUTPUT_DIRECTORY}")
|
||||
|
||||
foreach(test ${${MODULE_PREFIX}_TESTS})
|
||||
get_filename_component(TestName ${test} NAME_WE)
|
||||
add_test(${TestName} ${TESTING_OUTPUT_DIRECTORY}/${MODULE_NAME} ${TestName})
|
||||
endforeach()
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/Test")
|
|
@ -1,7 +0,0 @@
|
|||
|
||||
#include <winpr/crt.h>
|
||||
|
||||
int TestComReference(int argc, char* argv[])
|
||||
{
|
||||
return 0;
|
||||
}
|
|
@ -1520,7 +1520,7 @@ static BOOL _set_xon(WINPR_COMM* pComm)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL _get_dtrrts(WINPR_COMM* pComm, ULONG* pMask)
|
||||
static BOOL _get_dtrrts(WINPR_COMM* pComm, ULONG* pMask)
|
||||
{
|
||||
UINT32 lines = 0;
|
||||
if (ioctl(pComm->fd, TIOCMGET, &lines) < 0)
|
||||
|
@ -1540,7 +1540,7 @@ BOOL _get_dtrrts(WINPR_COMM* pComm, ULONG* pMask)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL _config_size(WINPR_COMM* pComm, ULONG* pSize)
|
||||
static BOOL _config_size(WINPR_COMM* pComm, ULONG* pSize)
|
||||
{
|
||||
/* http://msdn.microsoft.com/en-us/library/ff546548%28v=vs.85%29.aspx */
|
||||
if (!pSize)
|
||||
|
@ -1550,7 +1550,7 @@ BOOL _config_size(WINPR_COMM* pComm, ULONG* pSize)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL _immediate_char(WINPR_COMM* pComm, const UCHAR* pChar)
|
||||
static BOOL _immediate_char(WINPR_COMM* pComm, const UCHAR* pChar)
|
||||
{
|
||||
BOOL result;
|
||||
DWORD nbBytesWritten = -1;
|
||||
|
@ -1568,7 +1568,7 @@ BOOL _immediate_char(WINPR_COMM* pComm, const UCHAR* pChar)
|
|||
return result;
|
||||
}
|
||||
|
||||
BOOL _reset_device(WINPR_COMM* pComm)
|
||||
static BOOL _reset_device(WINPR_COMM* pComm)
|
||||
{
|
||||
/* http://msdn.microsoft.com/en-us/library/dn265347%28v=vs.85%29.aspx */
|
||||
return TRUE;
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
* RC4
|
||||
*/
|
||||
|
||||
WINPR_RC4_CTX* winpr_RC4_New_Internal(const BYTE* key, size_t keylen, BOOL override_fips)
|
||||
static WINPR_RC4_CTX* winpr_RC4_New_Internal(const BYTE* key, size_t keylen, BOOL override_fips)
|
||||
{
|
||||
WINPR_RC4_CTX* ctx = NULL;
|
||||
#if defined(WITH_OPENSSL)
|
||||
|
@ -136,7 +136,7 @@ extern mbedtls_md_type_t winpr_mbedtls_get_md_type(int md);
|
|||
#endif
|
||||
|
||||
#if defined(WITH_OPENSSL)
|
||||
const EVP_CIPHER* winpr_openssl_get_evp_cipher(int cipher)
|
||||
static const EVP_CIPHER* winpr_openssl_get_evp_cipher(int cipher)
|
||||
{
|
||||
const EVP_CIPHER* evp = NULL;
|
||||
|
||||
|
|
|
@ -863,7 +863,7 @@ static HANDLE FileCreateFileA(LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dw
|
|||
return pFile;
|
||||
}
|
||||
|
||||
BOOL IsFileDevice(LPCTSTR lpDeviceName)
|
||||
static BOOL IsFileDevice(LPCTSTR lpDeviceName)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -183,10 +183,10 @@ static wArrayList* _HandleCreators;
|
|||
|
||||
static pthread_once_t _HandleCreatorsInitialized = PTHREAD_ONCE_INIT;
|
||||
|
||||
HANDLE_CREATOR* GetNamedPipeClientHandleCreator(void);
|
||||
extern HANDLE_CREATOR* GetNamedPipeClientHandleCreator(void);
|
||||
|
||||
#if defined __linux__ && !defined ANDROID
|
||||
HANDLE_CREATOR* GetCommHandleCreator(void);
|
||||
extern HANDLE_CREATOR* GetCommHandleCreator(void);
|
||||
#endif /* __linux__ && !defined ANDROID */
|
||||
|
||||
static void _HandleCreatorsInit()
|
||||
|
|
|
@ -61,7 +61,7 @@ static BOOL NamedPipeClientIsHandled(HANDLE handle)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL NamedPipeClientCloseHandle(HANDLE handle)
|
||||
static BOOL NamedPipeClientCloseHandle(HANDLE handle)
|
||||
{
|
||||
WINPR_NAMED_PIPE* pNamedPipe = (WINPR_NAMED_PIPE*)handle;
|
||||
|
||||
|
|
|
@ -83,8 +83,9 @@ LPSTR FilePatternFindNextWildcardA(LPCSTR lpPattern, DWORD* pFlags)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
BOOL FilePatternMatchSubExpressionA(LPCSTR lpFileName, size_t cchFileName, LPCSTR lpX, size_t cchX,
|
||||
LPCSTR lpY, size_t cchY, LPCSTR lpWildcard, LPSTR* ppMatchEnd)
|
||||
static BOOL FilePatternMatchSubExpressionA(LPCSTR lpFileName, size_t cchFileName, LPCSTR lpX,
|
||||
size_t cchX, LPCSTR lpY, size_t cchY, LPCSTR lpWildcard,
|
||||
LPSTR* ppMatchEnd)
|
||||
{
|
||||
LPSTR lpMatch;
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
|
||||
#define DEVICE_FILE_PREFIX_PATH "\\Device\\"
|
||||
|
||||
char* GetDeviceFileNameWithoutPrefixA(LPCSTR lpName)
|
||||
static char* GetDeviceFileNameWithoutPrefixA(LPCSTR lpName)
|
||||
{
|
||||
char* lpFileName;
|
||||
|
||||
|
@ -79,7 +79,7 @@ char* GetDeviceFileNameWithoutPrefixA(LPCSTR lpName)
|
|||
return lpFileName;
|
||||
}
|
||||
|
||||
char* GetDeviceFileUnixDomainSocketBaseFilePathA()
|
||||
static char* GetDeviceFileUnixDomainSocketBaseFilePathA(void)
|
||||
{
|
||||
char* lpTempPath;
|
||||
char* lpPipePath;
|
||||
|
@ -93,7 +93,7 @@ char* GetDeviceFileUnixDomainSocketBaseFilePathA()
|
|||
return lpPipePath;
|
||||
}
|
||||
|
||||
char* GetDeviceFileUnixDomainSocketFilePathA(LPCSTR lpName)
|
||||
static char* GetDeviceFileUnixDomainSocketFilePathA(LPCSTR lpName)
|
||||
{
|
||||
char* lpPipePath = NULL;
|
||||
char* lpFileName = NULL;
|
||||
|
@ -239,7 +239,8 @@ VOID _IoDeleteDeviceEx(PDEVICE_OBJECT_EX DeviceObject)
|
|||
* http://msdn.microsoft.com/en-us/library/windows/hardware/ff549043/
|
||||
*/
|
||||
|
||||
NTSTATUS _IoCreateSymbolicLinkEx(PUNICODE_STRING SymbolicLinkName, PUNICODE_STRING DeviceName)
|
||||
static NTSTATUS _IoCreateSymbolicLinkEx(PUNICODE_STRING SymbolicLinkName,
|
||||
PUNICODE_STRING DeviceName)
|
||||
{
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
@ -249,7 +250,7 @@ NTSTATUS _IoCreateSymbolicLinkEx(PUNICODE_STRING SymbolicLinkName, PUNICODE_STRI
|
|||
* http://msdn.microsoft.com/en-us/library/windows/hardware/ff549085/
|
||||
*/
|
||||
|
||||
NTSTATUS _IoDeleteSymbolicLinkEx(PUNICODE_STRING SymbolicLinkName)
|
||||
static NTSTATUS _IoDeleteSymbolicLinkEx(PUNICODE_STRING SymbolicLinkName)
|
||||
{
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -337,7 +337,7 @@ static RegKey* reg_load_key(Reg* reg, RegKey* key)
|
|||
return subkey;
|
||||
}
|
||||
|
||||
void reg_load(Reg* reg)
|
||||
static void reg_load(Reg* reg)
|
||||
{
|
||||
reg_load_start(reg);
|
||||
|
||||
|
@ -388,7 +388,7 @@ static void reg_unload_key(Reg* reg, RegKey* key)
|
|||
free(key);
|
||||
}
|
||||
|
||||
void reg_unload(Reg* reg)
|
||||
static void reg_unload(Reg* reg)
|
||||
{
|
||||
RegKey* pKey;
|
||||
RegKey* pKeyNext;
|
||||
|
@ -490,7 +490,7 @@ void reg_print_key(Reg* reg, RegKey* key)
|
|||
}
|
||||
}
|
||||
|
||||
void reg_print(Reg* reg)
|
||||
static void reg_print(Reg* reg)
|
||||
{
|
||||
RegKey* pKey;
|
||||
pKey = reg->root_key->subkeys;
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
* http://dvlabs.tippingpoint.com/blog/2007/11/24/msrpc-ndr-types/
|
||||
*/
|
||||
|
||||
void NdrPrintParamAttributes(PARAM_ATTRIBUTES attributes)
|
||||
static void NdrPrintParamAttributes(PARAM_ATTRIBUTES attributes)
|
||||
{
|
||||
if (attributes.ServerAllocSize)
|
||||
WLog_INFO(TAG, "ServerAllocSize, ");
|
||||
|
@ -86,8 +86,8 @@ void NdrPrintParamAttributes(PARAM_ATTRIBUTES attributes)
|
|||
WLog_INFO(TAG, "MustSize, ");
|
||||
}
|
||||
|
||||
void NdrProcessParam(PMIDL_STUB_MESSAGE pStubMsg, NDR_PHASE phase, unsigned char* pMemory,
|
||||
NDR_PARAM* param)
|
||||
static void NdrProcessParam(PMIDL_STUB_MESSAGE pStubMsg, NDR_PHASE phase, unsigned char* pMemory,
|
||||
NDR_PARAM* param)
|
||||
{
|
||||
unsigned char type;
|
||||
PFORMAT_STRING pFormat;
|
||||
|
@ -144,8 +144,8 @@ void NdrProcessParam(PMIDL_STUB_MESSAGE pStubMsg, NDR_PHASE phase, unsigned char
|
|||
}
|
||||
}
|
||||
|
||||
void NdrProcessParams(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat, NDR_PHASE phase,
|
||||
void** fpuArgs, unsigned short numberParams)
|
||||
static void NdrProcessParams(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat, NDR_PHASE phase,
|
||||
void** fpuArgs, unsigned short numberParams)
|
||||
{
|
||||
unsigned int i;
|
||||
NDR_PARAM* params;
|
||||
|
@ -183,8 +183,8 @@ void NdrProcessParams(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat, NDR_P
|
|||
}
|
||||
}
|
||||
|
||||
void NdrClientInitializeNew(PRPC_MESSAGE pRpcMessage, PMIDL_STUB_MESSAGE pStubMsg,
|
||||
PMIDL_STUB_DESC pStubDesc, unsigned int ProcNum)
|
||||
static void NdrClientInitializeNew(PRPC_MESSAGE pRpcMessage, PMIDL_STUB_MESSAGE pStubMsg,
|
||||
PMIDL_STUB_DESC pStubDesc, unsigned int ProcNum)
|
||||
{
|
||||
pRpcMessage->Handle = NULL;
|
||||
pRpcMessage->RpcFlags = 0;
|
||||
|
@ -202,7 +202,7 @@ void NdrClientInitializeNew(PRPC_MESSAGE pRpcMessage, PMIDL_STUB_MESSAGE pStubMs
|
|||
pStubMsg->PointerLength = 0;
|
||||
}
|
||||
|
||||
void NdrPrintOptFlags(INTERPRETER_OPT_FLAGS optFlags)
|
||||
static void NdrPrintOptFlags(INTERPRETER_OPT_FLAGS optFlags)
|
||||
{
|
||||
if (optFlags.ClientMustSize)
|
||||
WLog_INFO(TAG, "ClientMustSize, ");
|
||||
|
@ -226,7 +226,7 @@ void NdrPrintOptFlags(INTERPRETER_OPT_FLAGS optFlags)
|
|||
WLog_INFO(TAG, "HasExtensions, ");
|
||||
}
|
||||
|
||||
void NdrPrintExtFlags(INTERPRETER_OPT_FLAGS2 extFlags)
|
||||
static void NdrPrintExtFlags(INTERPRETER_OPT_FLAGS2 extFlags)
|
||||
{
|
||||
if (extFlags.HasNewCorrDesc)
|
||||
WLog_INFO(TAG, "HasNewCorrDesc, ");
|
||||
|
|
|
@ -102,7 +102,7 @@ void NdrConformantVaryingStructBufferSize(PMIDL_STUB_MESSAGE pStubMsg, unsigned
|
|||
WLog_ERR(TAG, "warning: NdrConformantVaryingStructBufferSize unimplemented");
|
||||
}
|
||||
|
||||
ULONG NdrComplexStructMemberSize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
|
||||
static ULONG NdrComplexStructMemberSize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
|
||||
{
|
||||
ULONG size = 0;
|
||||
|
||||
|
|
|
@ -1324,7 +1324,7 @@ SCardApiFunctionTable Inspect_SCardApiFunctionTable = {
|
|||
#define SMARTCARD_INSPECT_FILEPATH "C:\\Windows\\Temp"
|
||||
#endif
|
||||
|
||||
void Inspect_InitLog()
|
||||
static void Inspect_InitLog(void)
|
||||
{
|
||||
wLogLayout* layout;
|
||||
wLogAppender* appender;
|
||||
|
|
|
@ -97,7 +97,7 @@ static SECURITY_STATUS SEC_ENTRY credssp_QueryContextAttributes(PCtxtHandle phCo
|
|||
return SEC_E_UNSUPPORTED_FUNCTION;
|
||||
}
|
||||
|
||||
SECURITY_STATUS SEC_ENTRY credssp_AcquireCredentialsHandleW(
|
||||
static SECURITY_STATUS SEC_ENTRY credssp_AcquireCredentialsHandleW(
|
||||
SEC_WCHAR* pszPrincipal, SEC_WCHAR* pszPackage, ULONG fCredentialUse, void* pvLogonID,
|
||||
void* pAuthData, SEC_GET_KEY_FN pGetKeyFn, void* pvGetKeyArgument, PCredHandle phCredential,
|
||||
PTimeStamp ptsExpiry)
|
||||
|
|
|
@ -121,7 +121,7 @@ void ntlm_print_version_info(NTLM_VERSION_INFO* versionInfo)
|
|||
WLog_INFO(TAG, "\tNTLMRevisionCurrent: 0x%02" PRIX8 "", versionInfo->NTLMRevisionCurrent);
|
||||
}
|
||||
|
||||
int ntlm_read_ntlm_v2_client_challenge(wStream* s, NTLMv2_CLIENT_CHALLENGE* challenge)
|
||||
static int ntlm_read_ntlm_v2_client_challenge(wStream* s, NTLMv2_CLIENT_CHALLENGE* challenge)
|
||||
{
|
||||
size_t size;
|
||||
Stream_Read_UINT8(s, challenge->RespType);
|
||||
|
@ -146,7 +146,7 @@ int ntlm_read_ntlm_v2_client_challenge(wStream* s, NTLMv2_CLIENT_CHALLENGE* chal
|
|||
return 1;
|
||||
}
|
||||
|
||||
int ntlm_write_ntlm_v2_client_challenge(wStream* s, NTLMv2_CLIENT_CHALLENGE* challenge)
|
||||
static int ntlm_write_ntlm_v2_client_challenge(wStream* s, NTLMv2_CLIENT_CHALLENGE* challenge)
|
||||
{
|
||||
ULONG length;
|
||||
Stream_Write_UINT8(s, challenge->RespType);
|
||||
|
@ -201,7 +201,7 @@ void ntlm_generate_timestamp(NTLM_CONTEXT* context)
|
|||
ntlm_current_time(context->Timestamp);
|
||||
}
|
||||
|
||||
int ntlm_fetch_ntlm_v2_hash(NTLM_CONTEXT* context, BYTE* hash)
|
||||
static int ntlm_fetch_ntlm_v2_hash(NTLM_CONTEXT* context, BYTE* hash)
|
||||
{
|
||||
WINPR_SAM* sam;
|
||||
WINPR_SAM_ENTRY* entry;
|
||||
|
@ -256,7 +256,7 @@ int ntlm_fetch_ntlm_v2_hash(NTLM_CONTEXT* context, BYTE* hash)
|
|||
return 1;
|
||||
}
|
||||
|
||||
int ntlm_convert_password_hash(NTLM_CONTEXT* context, BYTE* hash)
|
||||
static int ntlm_convert_password_hash(NTLM_CONTEXT* context, BYTE* hash)
|
||||
{
|
||||
int status;
|
||||
int i, hn, ln;
|
||||
|
@ -589,7 +589,8 @@ void ntlm_decrypt_random_session_key(NTLM_CONTEXT* context)
|
|||
* @param signing_key Destination signing key
|
||||
*/
|
||||
|
||||
int ntlm_generate_signing_key(BYTE* exported_session_key, PSecBuffer sign_magic, BYTE* signing_key)
|
||||
static int ntlm_generate_signing_key(BYTE* exported_session_key, PSecBuffer sign_magic,
|
||||
BYTE* signing_key)
|
||||
{
|
||||
int length;
|
||||
BYTE* value;
|
||||
|
@ -649,7 +650,8 @@ void ntlm_generate_server_signing_key(NTLM_CONTEXT* context)
|
|||
* @param sealing_key Destination sealing key
|
||||
*/
|
||||
|
||||
int ntlm_generate_sealing_key(BYTE* exported_session_key, PSecBuffer seal_magic, BYTE* sealing_key)
|
||||
static int ntlm_generate_sealing_key(BYTE* exported_session_key, PSecBuffer seal_magic,
|
||||
BYTE* sealing_key)
|
||||
{
|
||||
BYTE* p;
|
||||
SecBuffer buffer;
|
||||
|
|
|
@ -28,9 +28,9 @@
|
|||
|
||||
#include "../sspi.h"
|
||||
|
||||
char* SCHANNEL_PACKAGE_NAME = "Schannel";
|
||||
static char* SCHANNEL_PACKAGE_NAME = "Schannel";
|
||||
|
||||
SCHANNEL_CONTEXT* schannel_ContextNew()
|
||||
SCHANNEL_CONTEXT* schannel_ContextNew(void)
|
||||
{
|
||||
SCHANNEL_CONTEXT* context;
|
||||
context = (SCHANNEL_CONTEXT*)calloc(1, sizeof(SCHANNEL_CONTEXT));
|
||||
|
@ -58,14 +58,14 @@ void schannel_ContextFree(SCHANNEL_CONTEXT* context)
|
|||
free(context);
|
||||
}
|
||||
|
||||
SCHANNEL_CREDENTIALS* schannel_CredentialsNew()
|
||||
static SCHANNEL_CREDENTIALS* schannel_CredentialsNew(void)
|
||||
{
|
||||
SCHANNEL_CREDENTIALS* credentials;
|
||||
credentials = (SCHANNEL_CREDENTIALS*)calloc(1, sizeof(SCHANNEL_CREDENTIALS));
|
||||
return credentials;
|
||||
}
|
||||
|
||||
void schannel_CredentialsFree(SCHANNEL_CREDENTIALS* credentials)
|
||||
static void schannel_CredentialsFree(SCHANNEL_CREDENTIALS* credentials)
|
||||
{
|
||||
free(credentials);
|
||||
}
|
||||
|
@ -87,8 +87,9 @@ static ALG_ID schannel_SupportedAlgs[] = { CALG_AES_128,
|
|||
CALG_DSS_SIGN,
|
||||
CALG_ECDSA };
|
||||
|
||||
SECURITY_STATUS SEC_ENTRY schannel_QueryCredentialsAttributesW(PCredHandle phCredential,
|
||||
ULONG ulAttribute, void* pBuffer)
|
||||
static SECURITY_STATUS SEC_ENTRY schannel_QueryCredentialsAttributesW(PCredHandle phCredential,
|
||||
ULONG ulAttribute,
|
||||
void* pBuffer)
|
||||
{
|
||||
if (ulAttribute == SECPKG_ATTR_SUPPORTED_ALGS)
|
||||
{
|
||||
|
@ -115,13 +116,14 @@ SECURITY_STATUS SEC_ENTRY schannel_QueryCredentialsAttributesW(PCredHandle phCre
|
|||
return SEC_E_UNSUPPORTED_FUNCTION;
|
||||
}
|
||||
|
||||
SECURITY_STATUS SEC_ENTRY schannel_QueryCredentialsAttributesA(PCredHandle phCredential,
|
||||
ULONG ulAttribute, void* pBuffer)
|
||||
static SECURITY_STATUS SEC_ENTRY schannel_QueryCredentialsAttributesA(PCredHandle phCredential,
|
||||
ULONG ulAttribute,
|
||||
void* pBuffer)
|
||||
{
|
||||
return schannel_QueryCredentialsAttributesW(phCredential, ulAttribute, pBuffer);
|
||||
}
|
||||
|
||||
SECURITY_STATUS SEC_ENTRY schannel_AcquireCredentialsHandleW(
|
||||
static SECURITY_STATUS SEC_ENTRY schannel_AcquireCredentialsHandleW(
|
||||
SEC_WCHAR* pszPrincipal, SEC_WCHAR* pszPackage, ULONG fCredentialUse, void* pvLogonID,
|
||||
void* pAuthData, SEC_GET_KEY_FN pGetKeyFn, void* pvGetKeyArgument, PCredHandle phCredential,
|
||||
PTimeStamp ptsExpiry)
|
||||
|
@ -156,7 +158,7 @@ SECURITY_STATUS SEC_ENTRY schannel_AcquireCredentialsHandleW(
|
|||
return SEC_E_OK;
|
||||
}
|
||||
|
||||
SECURITY_STATUS SEC_ENTRY schannel_AcquireCredentialsHandleA(
|
||||
static SECURITY_STATUS SEC_ENTRY schannel_AcquireCredentialsHandleA(
|
||||
SEC_CHAR* pszPrincipal, SEC_CHAR* pszPackage, ULONG fCredentialUse, void* pvLogonID,
|
||||
void* pAuthData, SEC_GET_KEY_FN pGetKeyFn, void* pvGetKeyArgument, PCredHandle phCredential,
|
||||
PTimeStamp ptsExpiry)
|
||||
|
@ -174,7 +176,7 @@ SECURITY_STATUS SEC_ENTRY schannel_AcquireCredentialsHandleA(
|
|||
return status;
|
||||
}
|
||||
|
||||
SECURITY_STATUS SEC_ENTRY schannel_FreeCredentialsHandle(PCredHandle phCredential)
|
||||
static SECURITY_STATUS SEC_ENTRY schannel_FreeCredentialsHandle(PCredHandle phCredential)
|
||||
{
|
||||
SCHANNEL_CREDENTIALS* credentials;
|
||||
|
||||
|
@ -190,7 +192,7 @@ SECURITY_STATUS SEC_ENTRY schannel_FreeCredentialsHandle(PCredHandle phCredentia
|
|||
return SEC_E_OK;
|
||||
}
|
||||
|
||||
SECURITY_STATUS SEC_ENTRY schannel_InitializeSecurityContextW(
|
||||
static SECURITY_STATUS SEC_ENTRY schannel_InitializeSecurityContextW(
|
||||
PCredHandle phCredential, PCtxtHandle phContext, SEC_WCHAR* pszTargetName, ULONG fContextReq,
|
||||
ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput, ULONG Reserved2,
|
||||
PCtxtHandle phNewContext, PSecBufferDesc pOutput, PULONG pfContextAttr, PTimeStamp ptsExpiry)
|
||||
|
@ -219,7 +221,7 @@ SECURITY_STATUS SEC_ENTRY schannel_InitializeSecurityContextW(
|
|||
return status;
|
||||
}
|
||||
|
||||
SECURITY_STATUS SEC_ENTRY schannel_InitializeSecurityContextA(
|
||||
static SECURITY_STATUS SEC_ENTRY schannel_InitializeSecurityContextA(
|
||||
PCredHandle phCredential, PCtxtHandle phContext, SEC_CHAR* pszTargetName, ULONG fContextReq,
|
||||
ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput, ULONG Reserved2,
|
||||
PCtxtHandle phNewContext, PSecBufferDesc pOutput, PULONG pfContextAttr, PTimeStamp ptsExpiry)
|
||||
|
@ -239,7 +241,7 @@ SECURITY_STATUS SEC_ENTRY schannel_InitializeSecurityContextA(
|
|||
return status;
|
||||
}
|
||||
|
||||
SECURITY_STATUS SEC_ENTRY schannel_AcceptSecurityContext(
|
||||
static SECURITY_STATUS SEC_ENTRY schannel_AcceptSecurityContext(
|
||||
PCredHandle phCredential, PCtxtHandle phContext, PSecBufferDesc pInput, ULONG fContextReq,
|
||||
ULONG TargetDataRep, PCtxtHandle phNewContext, PSecBufferDesc pOutput, PULONG pfContextAttr,
|
||||
PTimeStamp ptsTimeStamp)
|
||||
|
@ -265,7 +267,7 @@ SECURITY_STATUS SEC_ENTRY schannel_AcceptSecurityContext(
|
|||
return status;
|
||||
}
|
||||
|
||||
SECURITY_STATUS SEC_ENTRY schannel_DeleteSecurityContext(PCtxtHandle phContext)
|
||||
static SECURITY_STATUS SEC_ENTRY schannel_DeleteSecurityContext(PCtxtHandle phContext)
|
||||
{
|
||||
SCHANNEL_CONTEXT* context;
|
||||
context = (SCHANNEL_CONTEXT*)sspi_SecureHandleGetLowerPointer(phContext);
|
||||
|
@ -277,8 +279,8 @@ SECURITY_STATUS SEC_ENTRY schannel_DeleteSecurityContext(PCtxtHandle phContext)
|
|||
return SEC_E_OK;
|
||||
}
|
||||
|
||||
SECURITY_STATUS SEC_ENTRY schannel_QueryContextAttributes(PCtxtHandle phContext, ULONG ulAttribute,
|
||||
void* pBuffer)
|
||||
static SECURITY_STATUS SEC_ENTRY schannel_QueryContextAttributes(PCtxtHandle phContext,
|
||||
ULONG ulAttribute, void* pBuffer)
|
||||
{
|
||||
if (!phContext)
|
||||
return SEC_E_INVALID_HANDLE;
|
||||
|
@ -309,20 +311,22 @@ SECURITY_STATUS SEC_ENTRY schannel_QueryContextAttributes(PCtxtHandle phContext,
|
|||
return SEC_E_UNSUPPORTED_FUNCTION;
|
||||
}
|
||||
|
||||
SECURITY_STATUS SEC_ENTRY schannel_MakeSignature(PCtxtHandle phContext, ULONG fQOP,
|
||||
PSecBufferDesc pMessage, ULONG MessageSeqNo)
|
||||
static SECURITY_STATUS SEC_ENTRY schannel_MakeSignature(PCtxtHandle phContext, ULONG fQOP,
|
||||
PSecBufferDesc pMessage, ULONG MessageSeqNo)
|
||||
{
|
||||
return SEC_E_OK;
|
||||
}
|
||||
|
||||
SECURITY_STATUS SEC_ENTRY schannel_VerifySignature(PCtxtHandle phContext, PSecBufferDesc pMessage,
|
||||
ULONG MessageSeqNo, ULONG* pfQOP)
|
||||
static SECURITY_STATUS SEC_ENTRY schannel_VerifySignature(PCtxtHandle phContext,
|
||||
PSecBufferDesc pMessage,
|
||||
ULONG MessageSeqNo, ULONG* pfQOP)
|
||||
{
|
||||
return SEC_E_OK;
|
||||
}
|
||||
|
||||
SECURITY_STATUS SEC_ENTRY schannel_EncryptMessage(PCtxtHandle phContext, ULONG fQOP,
|
||||
PSecBufferDesc pMessage, ULONG MessageSeqNo)
|
||||
static SECURITY_STATUS SEC_ENTRY schannel_EncryptMessage(PCtxtHandle phContext, ULONG fQOP,
|
||||
PSecBufferDesc pMessage,
|
||||
ULONG MessageSeqNo)
|
||||
{
|
||||
SECURITY_STATUS status;
|
||||
SCHANNEL_CONTEXT* context;
|
||||
|
@ -335,8 +339,9 @@ SECURITY_STATUS SEC_ENTRY schannel_EncryptMessage(PCtxtHandle phContext, ULONG f
|
|||
return status;
|
||||
}
|
||||
|
||||
SECURITY_STATUS SEC_ENTRY schannel_DecryptMessage(PCtxtHandle phContext, PSecBufferDesc pMessage,
|
||||
ULONG MessageSeqNo, ULONG* pfQOP)
|
||||
static SECURITY_STATUS SEC_ENTRY schannel_DecryptMessage(PCtxtHandle phContext,
|
||||
PSecBufferDesc pMessage,
|
||||
ULONG MessageSeqNo, ULONG* pfQOP)
|
||||
{
|
||||
SECURITY_STATUS status;
|
||||
SCHANNEL_CONTEXT* context;
|
||||
|
|
|
@ -49,7 +49,7 @@ struct _SCHANNEL_OPENSSL
|
|||
#include "../../log.h"
|
||||
#define TAG WINPR_TAG("sspi.schannel")
|
||||
|
||||
char* openssl_get_ssl_error_string(int ssl_error)
|
||||
static char* openssl_get_ssl_error_string(int ssl_error)
|
||||
{
|
||||
switch (ssl_error)
|
||||
{
|
||||
|
|
|
@ -18,14 +18,12 @@
|
|||
winpr_module_add(
|
||||
address.c
|
||||
barrier.c
|
||||
condition.c
|
||||
critical.c
|
||||
event.c
|
||||
init.c
|
||||
mutex.c
|
||||
semaphore.c
|
||||
sleep.c
|
||||
srw.c
|
||||
synch.h
|
||||
timer.c
|
||||
wait.c)
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
/**
|
||||
* WinPR: Windows Portable Runtime
|
||||
* Synchronization Functions
|
||||
*
|
||||
* Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <winpr/synch.h>
|
||||
|
||||
#include "synch.h"
|
||||
|
||||
/**
|
||||
* InitializeConditionVariable
|
||||
* SleepConditionVariableCS
|
||||
* SleepConditionVariableSRW
|
||||
* WakeAllConditionVariable
|
||||
* WakeConditionVariable
|
||||
*/
|
||||
|
||||
#ifndef _WIN32
|
||||
|
||||
VOID InitializeConditionVariable(PCONDITION_VARIABLE ConditionVariable)
|
||||
{
|
||||
}
|
||||
|
||||
BOOL SleepConditionVariableCS(PCONDITION_VARIABLE ConditionVariable,
|
||||
PCRITICAL_SECTION CriticalSection, DWORD dwMilliseconds)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL SleepConditionVariableSRW(PCONDITION_VARIABLE ConditionVariable, PSRWLOCK SRWLock,
|
||||
DWORD dwMilliseconds, ULONG Flags)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
VOID WakeAllConditionVariable(PCONDITION_VARIABLE ConditionVariable)
|
||||
{
|
||||
}
|
||||
|
||||
VOID WakeConditionVariable(PCONDITION_VARIABLE ConditionVariable)
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,68 +0,0 @@
|
|||
/**
|
||||
* WinPR: Windows Portable Runtime
|
||||
* Synchronization Functions
|
||||
*
|
||||
* Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <winpr/synch.h>
|
||||
|
||||
/**
|
||||
* InitializeSRWLock
|
||||
* AcquireSRWLockExclusive
|
||||
* AcquireSRWLockShared
|
||||
* TryAcquireSRWLockExclusive
|
||||
* TryAcquireSRWLockShared
|
||||
* ReleaseSRWLockExclusive
|
||||
* ReleaseSRWLockShared
|
||||
*/
|
||||
|
||||
#ifndef _WIN32
|
||||
|
||||
VOID InitializeSRWLock(PSRWLOCK SRWLock)
|
||||
{
|
||||
}
|
||||
|
||||
VOID AcquireSRWLockExclusive(PSRWLOCK SRWLock)
|
||||
{
|
||||
}
|
||||
|
||||
VOID AcquireSRWLockShared(PSRWLOCK SRWLock)
|
||||
{
|
||||
}
|
||||
|
||||
BOOL TryAcquireSRWLockExclusive(PSRWLOCK SRWLock)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL TryAcquireSRWLockShared(PSRWLOCK SRWLock)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
VOID ReleaseSRWLockExclusive(PSRWLOCK SRWLock)
|
||||
{
|
||||
}
|
||||
|
||||
VOID ReleaseSRWLockShared(PSRWLOCK SRWLock)
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
|
@ -386,6 +386,28 @@ BOOL GetVersionExW(LPOSVERSIONINFOW lpVersionInformation)
|
|||
|
||||
#if !defined(_WIN32) || defined(_UWP)
|
||||
|
||||
BOOL GetComputerNameW(LPWSTR lpBuffer, LPDWORD lpnSize)
|
||||
{
|
||||
BOOL rc;
|
||||
LPSTR buffer = NULL;
|
||||
if (!lpnSize || (*lpnSize > INT_MAX))
|
||||
return FALSE;
|
||||
|
||||
if (*lpnSize > 0)
|
||||
{
|
||||
buffer = malloc(*lpnSize);
|
||||
if (!buffer)
|
||||
return FALSE;
|
||||
}
|
||||
rc = GetComputerNameA(buffer, lpnSize);
|
||||
|
||||
if (rc && (*lpnSize > 0))
|
||||
ConvertToUnicode(CP_UTF8, 0, buffer, (int)*lpnSize, &lpBuffer, (int)*lpnSize);
|
||||
free(buffer);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
BOOL GetComputerNameA(LPSTR lpBuffer, LPDWORD lpnSize)
|
||||
{
|
||||
char* dot;
|
||||
|
|
|
@ -143,11 +143,12 @@ static char* FindApplicationPath(char* application)
|
|||
static HANDLE CreateProcessHandle(pid_t pid);
|
||||
static BOOL ProcessHandleCloseHandle(HANDLE handle);
|
||||
|
||||
BOOL _CreateProcessExA(HANDLE hToken, DWORD dwLogonFlags, LPCSTR lpApplicationName,
|
||||
LPSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes,
|
||||
LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles,
|
||||
DWORD dwCreationFlags, LPVOID lpEnvironment, LPCSTR lpCurrentDirectory,
|
||||
LPSTARTUPINFOA lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
|
||||
static BOOL _CreateProcessExA(HANDLE hToken, DWORD dwLogonFlags, LPCSTR lpApplicationName,
|
||||
LPSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes,
|
||||
LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles,
|
||||
DWORD dwCreationFlags, LPVOID lpEnvironment,
|
||||
LPCSTR lpCurrentDirectory, LPSTARTUPINFOA lpStartupInfo,
|
||||
LPPROCESS_INFORMATION lpProcessInformation)
|
||||
{
|
||||
pid_t pid;
|
||||
int numArgs;
|
||||
|
@ -453,17 +454,6 @@ DWORD GetCurrentProcessId(VOID)
|
|||
return ((DWORD)getpid());
|
||||
}
|
||||
|
||||
DWORD GetProcessId(HANDLE Process)
|
||||
{
|
||||
WINPR_PROCESS* process;
|
||||
process = (WINPR_PROCESS*)Process;
|
||||
|
||||
if (!process)
|
||||
return 0;
|
||||
|
||||
return (DWORD)process->pid;
|
||||
}
|
||||
|
||||
BOOL TerminateProcess(HANDLE hProcess, UINT uExitCode)
|
||||
{
|
||||
WINPR_PROCESS* process;
|
||||
|
|
|
@ -29,7 +29,6 @@ set(${MODULE_PREFIX}_COLLECTIONS_SRCS
|
|||
collections/LinkedList.c
|
||||
collections/HashTable.c
|
||||
collections/ListDictionary.c
|
||||
collections/KeyValuePair.c
|
||||
collections/CountdownEvent.c
|
||||
collections/BufferPool.c
|
||||
collections/ObjectPool.c
|
||||
|
@ -76,7 +75,6 @@ set(${MODULE_PREFIX}_WLOG_SRCS
|
|||
wlog/Layout.h
|
||||
wlog/Message.c
|
||||
wlog/Message.h
|
||||
wlog/TextMessage.c
|
||||
wlog/DataMessage.c
|
||||
wlog/DataMessage.h
|
||||
wlog/ImageMessage.c
|
||||
|
|
|
@ -143,7 +143,7 @@ void ArrayList_SetItem(wArrayList* arrayList, int index, void* obj)
|
|||
* Shift a section of the list.
|
||||
*/
|
||||
|
||||
BOOL ArrayList_Shift(wArrayList* arrayList, int index, int count)
|
||||
static BOOL ArrayList_Shift(wArrayList* arrayList, int index, int count)
|
||||
{
|
||||
if (count > 0)
|
||||
{
|
||||
|
|
|
@ -46,7 +46,7 @@ void BipBuffer_Clear(wBipBuffer* bb)
|
|||
BipBlock_Clear(bb->writeR);
|
||||
}
|
||||
|
||||
BOOL BipBuffer_AllocBuffer(wBipBuffer* bb, size_t size)
|
||||
static BOOL BipBuffer_AllocBuffer(wBipBuffer* bb, size_t size)
|
||||
{
|
||||
if (size < 1)
|
||||
return FALSE;
|
||||
|
@ -104,7 +104,7 @@ BOOL BipBuffer_Grow(wBipBuffer* bb, size_t size)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
void BipBuffer_FreeBuffer(wBipBuffer* bb)
|
||||
static void BipBuffer_FreeBuffer(wBipBuffer* bb)
|
||||
{
|
||||
if (bb->buffer)
|
||||
{
|
||||
|
|
|
@ -45,7 +45,7 @@ int Dictionary_Count(wDictionary* dictionary)
|
|||
* Gets a value indicating whether the Dictionary has a fixed size.
|
||||
*/
|
||||
|
||||
BOOL Dictionary_IsFixedSized(wDictionary* dictionary)
|
||||
static BOOL Dictionary_IsFixedSized(wDictionary* dictionary)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ BOOL Dictionary_IsFixedSized(wDictionary* dictionary)
|
|||
* Gets a value indicating whether the Dictionary is read-only.
|
||||
*/
|
||||
|
||||
BOOL Dictionary_IsReadOnly(wDictionary* dictionary)
|
||||
static BOOL Dictionary_IsReadOnly(wDictionary* dictionary)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ BOOL Dictionary_IsReadOnly(wDictionary* dictionary)
|
|||
* Gets a value indicating whether the Dictionary is synchronized (thread safe).
|
||||
*/
|
||||
|
||||
BOOL Dictionary_IsSynchronized(wDictionary* dictionary)
|
||||
static BOOL Dictionary_IsSynchronized(wDictionary* dictionary)
|
||||
{
|
||||
return dictionary->synchronized;
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@ static long HashTable_CalculateIdealNumOfBuckets(wHashTable* table)
|
|||
return idealNumOfBuckets;
|
||||
}
|
||||
|
||||
void HashTable_Rehash(wHashTable* table, int numOfBuckets)
|
||||
static void HashTable_Rehash(wHashTable* table, int numOfBuckets)
|
||||
{
|
||||
int index;
|
||||
UINT32 hashValue;
|
||||
|
@ -148,8 +148,8 @@ void HashTable_Rehash(wHashTable* table, int numOfBuckets)
|
|||
table->numOfBuckets = numOfBuckets;
|
||||
}
|
||||
|
||||
void HashTable_SetIdealRatio(wHashTable* table, float idealRatio, float lowerRehashThreshold,
|
||||
float upperRehashThreshold)
|
||||
static void HashTable_SetIdealRatio(wHashTable* table, float idealRatio, float lowerRehashThreshold,
|
||||
float upperRehashThreshold)
|
||||
{
|
||||
table->idealRatio = idealRatio;
|
||||
table->lowerRehashThreshold = lowerRehashThreshold;
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче