GUACAMOLE-422: Add logging for RDP timzeone.

This commit is contained in:
Nick Couchman 2018-11-11 17:22:03 -05:00
parent b3be9eb869
commit 4bd19160de
2 changed files with 11 additions and 5 deletions

View File

@ -719,7 +719,7 @@ static int guac_rdp_handle_connection(guac_client* client) {
guac_common_cursor_set_pointer(rdp_client->display->cursor);
/* Push desired settings to FreeRDP */
guac_rdp_push_settings(settings, rdp_inst);
guac_rdp_push_settings(client, settings, rdp_inst);
/* Connect to RDP server */
if (!freerdp_connect(rdp_inst)) {

View File

@ -1169,7 +1169,8 @@ static char* guac_rdp_strdup(const char* str) {
}
void guac_rdp_push_settings(guac_rdp_settings* guac_settings, freerdp* rdp) {
void guac_rdp_push_settings(guac_client* client,
guac_rdp_settings* guac_settings, freerdp* rdp) {
BOOL bitmap_cache = !guac_settings->disable_bitmap_caching;
rdpSettings* rdp_settings = rdp->settings;
@ -1280,10 +1281,15 @@ void guac_rdp_push_settings(guac_rdp_settings* guac_settings, freerdp* rdp) {
#endif
#endif
/* Device redirection */
if (guac_settings->timezone)
setenv("TZ", guac_settings->timezone, 1)
/* Timezone redirection */
if (guac_settings->timezone) {
if(setenv("TZ", guac_settings->timezone, 1)) {
guac_client_log(client, GUAC_LOG_WARNING,
"Unable to set TZ variable, error %i", errno);
}
}
/* Device redirection */
#ifdef LEGACY_RDPSETTINGS
#ifdef HAVE_RDPSETTINGS_DEVICEREDIRECTION
rdp_settings->device_redirection = guac_settings->audio_enabled