Made internal functions static to help compiler optimize.

This commit is contained in:
Armin Novak 2018-07-10 12:21:38 +02:00
parent 7a39dcd7e2
commit 77eb93b4b7
5 changed files with 17 additions and 22 deletions

View File

@ -167,6 +167,8 @@
* and server-side applications).
*/
static int rdp_client_connect_finalize(rdpRdp* rdp);
/**
* Establish RDP Connection based on the settings given in the 'rdp' parameter.
* @msdn{cc240452}
@ -482,7 +484,7 @@ BOOL rdp_client_reconnect(rdpRdp* rdp)
return status;
}
static BYTE fips_ivec[8] = { 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF };
static const BYTE fips_ivec[8] = { 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF };
static BOOL rdp_client_establish_keys(rdpRdp* rdp)
{

View File

@ -66,7 +66,6 @@ FREERDP_LOCAL BOOL rdp_client_connect_mcs_channel_join_confirm(rdpRdp* rdp,
FREERDP_LOCAL BOOL rdp_client_connect_auto_detect(rdpRdp* rdp, wStream* s);
FREERDP_LOCAL int rdp_client_connect_license(rdpRdp* rdp, wStream* s);
FREERDP_LOCAL int rdp_client_connect_demand_active(rdpRdp* rdp, wStream* s);
FREERDP_LOCAL int rdp_client_connect_finalize(rdpRdp* rdp);
FREERDP_LOCAL int rdp_client_transition_to_state(rdpRdp* rdp, int state);
FREERDP_LOCAL BOOL rdp_server_accept_nego(rdpRdp* rdp, wStream* s);

View File

@ -63,6 +63,12 @@ static const char PROTOCOL_SECURITY_STRINGS[9][4] =
static BOOL nego_transport_connect(rdpNego* nego);
static BOOL nego_transport_disconnect(rdpNego* nego);
static BOOL nego_security_connect(rdpNego* nego);
static BOOL nego_send_preconnection_pdu(rdpNego* nego);
static BOOL nego_recv_response(rdpNego* nego);
static void nego_send(rdpNego* nego);
static void nego_process_negotiation_request(rdpNego* nego, wStream* s);
static void nego_process_negotiation_response(rdpNego* nego, wStream* s);
static void nego_process_negotiation_failure(rdpNego* nego, wStream* s);
/**
* Negotiate protocol security and connect.
@ -369,7 +375,7 @@ BOOL nego_send_preconnection_pdu(rdpNego* nego)
* @param nego
*/
void nego_attempt_ext(rdpNego* nego)
static void nego_attempt_ext(rdpNego* nego)
{
nego->RequestedProtocols = PROTOCOL_NLA | PROTOCOL_TLS | PROTOCOL_EXT;
WLog_DBG(TAG, "Attempting NLA extended security");
@ -414,7 +420,7 @@ void nego_attempt_ext(rdpNego* nego)
* @param nego
*/
void nego_attempt_nla(rdpNego* nego)
static void nego_attempt_nla(rdpNego* nego)
{
nego->RequestedProtocols = PROTOCOL_NLA | PROTOCOL_TLS;
WLog_DBG(TAG, "Attempting NLA security");
@ -457,7 +463,7 @@ void nego_attempt_nla(rdpNego* nego)
* @param nego
*/
void nego_attempt_tls(rdpNego* nego)
static void nego_attempt_tls(rdpNego* nego)
{
nego->RequestedProtocols = PROTOCOL_TLS;
WLog_DBG(TAG, "Attempting TLS security");
@ -496,7 +502,7 @@ void nego_attempt_tls(rdpNego* nego)
* @param nego
*/
void nego_attempt_rdp(rdpNego* nego)
static void nego_attempt_rdp(rdpNego* nego)
{
nego->RequestedProtocols = PROTOCOL_RDP;
WLog_DBG(TAG, "Attempting RDP security");

View File

@ -120,22 +120,10 @@ typedef struct rdp_nego rdpNego;
FREERDP_LOCAL BOOL nego_connect(rdpNego* nego);
FREERDP_LOCAL BOOL nego_disconnect(rdpNego* nego);
FREERDP_LOCAL BOOL nego_send_preconnection_pdu(rdpNego* nego);
FREERDP_LOCAL void nego_attempt_ext(rdpNego* nego);
FREERDP_LOCAL void nego_attempt_nla(rdpNego* nego);
FREERDP_LOCAL void nego_attempt_tls(rdpNego* nego);
FREERDP_LOCAL void nego_attempt_rdp(rdpNego* nego);
FREERDP_LOCAL void nego_send(rdpNego* nego);
FREERDP_LOCAL int nego_recv(rdpTransport* transport, wStream* s, void* extra);
FREERDP_LOCAL BOOL nego_recv_response(rdpNego* nego);
FREERDP_LOCAL BOOL nego_read_request(rdpNego* nego, wStream* s);
FREERDP_LOCAL BOOL nego_send_negotiation_request(rdpNego* nego);
FREERDP_LOCAL void nego_process_negotiation_request(rdpNego* nego, wStream* s);
FREERDP_LOCAL void nego_process_negotiation_response(rdpNego* nego, wStream* s);
FREERDP_LOCAL void nego_process_negotiation_failure(rdpNego* nego, wStream* s);
FREERDP_LOCAL BOOL nego_send_negotiation_response(rdpNego* nego);
FREERDP_LOCAL rdpNego* nego_new(rdpTransport* transport);

View File

@ -66,7 +66,7 @@ static const char client_dll[] = "C:\\Windows\\System32\\mstscax.dll";
#define GLYPH_CACHE_KEY CLIENT_KEY "\\GlyphCache"
#define POINTER_CACHE_KEY CLIENT_KEY "\\PointerCache"
void settings_client_load_hkey_local_machine(rdpSettings* settings)
static void settings_client_load_hkey_local_machine(rdpSettings* settings)
{
HKEY hKey;
LONG status;
@ -218,7 +218,7 @@ void settings_client_load_hkey_local_machine(rdpSettings* settings)
}
}
void settings_server_load_hkey_local_machine(rdpSettings* settings)
static void settings_server_load_hkey_local_machine(rdpSettings* settings)
{
HKEY hKey;
LONG status;
@ -242,7 +242,7 @@ void settings_server_load_hkey_local_machine(rdpSettings* settings)
RegCloseKey(hKey);
}
void settings_load_hkey_local_machine(rdpSettings* settings)
static void settings_load_hkey_local_machine(rdpSettings* settings)
{
if (settings->ServerMode)
settings_server_load_hkey_local_machine(settings);
@ -250,7 +250,7 @@ void settings_load_hkey_local_machine(rdpSettings* settings)
settings_client_load_hkey_local_machine(settings);
}
BOOL settings_get_computer_name(rdpSettings* settings)
static BOOL settings_get_computer_name(rdpSettings* settings)
{
DWORD nSize = 0;
CHAR* computerName;