[return checks] fix use of rdpSettings getter/setter
This commit is contained in:
parent
c0d06c782b
commit
f655843260
@ -1411,7 +1411,8 @@ client_encomsp_participant_created(EncomspClientContext* context,
|
||||
/* if auto-request-control setting is enabled then only request control once upon connect,
|
||||
* otherwise it will auto request control again every time server turns off control which
|
||||
* is a bit annoying */
|
||||
freerdp_settings_set_bool(settings, FreeRDP_RemoteAssistanceRequestControl, FALSE);
|
||||
if (!freerdp_settings_set_bool(settings, FreeRDP_RemoteAssistanceRequestControl, FALSE))
|
||||
return ERROR_INTERNAL_ERROR;
|
||||
}
|
||||
|
||||
return CHANNEL_RC_OK;
|
||||
|
@ -2464,7 +2464,8 @@ static int parse_host_options(rdpSettings* settings, const COMMAND_LINE_ARGUMENT
|
||||
|
||||
if (!arg->Value)
|
||||
return COMMAND_LINE_ERROR_UNEXPECTED_VALUE;
|
||||
freerdp_settings_set_string(settings, FreeRDP_ServerHostname, NULL);
|
||||
if (!freerdp_settings_set_string(settings, FreeRDP_ServerHostname, NULL))
|
||||
return COMMAND_LINE_ERROR_MEMORY;
|
||||
char* p = strchr(arg->Value, '[');
|
||||
|
||||
/* ipv4 */
|
||||
|
@ -677,9 +677,9 @@ void freerdp_static_channel_collection_free(rdpSettings* settings)
|
||||
}
|
||||
|
||||
free(settings->StaticChannelArray);
|
||||
freerdp_settings_set_uint32(settings, FreeRDP_StaticChannelArraySize, 0);
|
||||
(void)freerdp_settings_set_uint32(settings, FreeRDP_StaticChannelArraySize, 0);
|
||||
settings->StaticChannelArray = NULL;
|
||||
freerdp_settings_set_uint32(settings, FreeRDP_StaticChannelCount, 0);
|
||||
(void)freerdp_settings_set_uint32(settings, FreeRDP_StaticChannelCount, 0);
|
||||
}
|
||||
|
||||
BOOL freerdp_dynamic_channel_collection_del(rdpSettings* settings, const char* name)
|
||||
|
@ -1366,7 +1366,10 @@ BOOL gcc_read_client_core_data(wStream* s, rdpMcs* mcs)
|
||||
*/
|
||||
if ((clientColorDepth < freerdp_settings_get_uint32(settings, FreeRDP_ColorDepth)) ||
|
||||
!settings->ServerMode)
|
||||
freerdp_settings_set_uint32(settings, FreeRDP_ColorDepth, clientColorDepth);
|
||||
{
|
||||
if (!freerdp_settings_set_uint32(settings, FreeRDP_ColorDepth, clientColorDepth))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
WLog_DBG(TAG, "Received EarlyCapabilityFlags=%s",
|
||||
rdp_early_client_caps_string(settings->EarlyCapabilityFlags, buffer, sizeof(buffer)));
|
||||
|
@ -137,9 +137,15 @@ static BOOL pf_server_get_target_info(rdpContext* context, rdpSettings* settings
|
||||
WINPR_ASSERT(config);
|
||||
|
||||
if (config->TargetPort > 0)
|
||||
freerdp_settings_set_uint32(settings, FreeRDP_ServerPort, config->TargetPort);
|
||||
{
|
||||
if (!freerdp_settings_set_uint32(settings, FreeRDP_ServerPort, config->TargetPort))
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
freerdp_settings_set_uint32(settings, FreeRDP_ServerPort, 3389);
|
||||
{
|
||||
if (!freerdp_settings_set_uint32(settings, FreeRDP_ServerPort, 3389))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!freerdp_settings_set_uint32(settings, FreeRDP_TlsSecLevel,
|
||||
config->TargetTlsSecLevel))
|
||||
|
Loading…
Reference in New Issue
Block a user