[core,timezone] initialize ClientTimeZone early

Initialize ClientTimeZone in freerdp_settings_new to allow replacing the
default later on in command line parser or client connection callbacks
This commit is contained in:
akallabeth 2024-04-23 09:08:11 +02:00 committed by akallabeth
parent 8b382c8cec
commit fc21b82880
2 changed files with 3 additions and 1 deletions

View File

@ -693,6 +693,9 @@ rdpSettings* freerdp_settings_new(DWORD flags)
if (!settings->ClientTimeZone)
goto out_fail;
if (!settings->ServerMode)
GetTimeZoneInformation(settings->ClientTimeZone);
if (!freerdp_settings_set_bool(settings, FreeRDP_TcpKeepAlive, TRUE) ||
!freerdp_settings_set_uint32(settings, FreeRDP_TcpKeepAliveRetries, 3) ||
!freerdp_settings_set_uint32(settings, FreeRDP_TcpKeepAliveDelay, 5) ||

View File

@ -143,7 +143,6 @@ BOOL rdp_write_client_time_zone(wStream* s, rdpSettings* settings)
if (!tz)
return FALSE;
GetTimeZoneInformation(tz);
if (!Stream_EnsureRemainingCapacity(s, 4ull + sizeof(tz->StandardName)))
return FALSE;