Skip to content

Commit

Permalink
GUACAMOLE-422: Add logging for RDP timzeone.
Browse files Browse the repository at this point in the history
  • Loading branch information
necouchman committed Nov 11, 2018
1 parent b3be9eb commit 4bd1916
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/protocols/rdp/rdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
14 changes: 10 additions & 4 deletions src/protocols/rdp/rdp_settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4bd1916

Please sign in to comment.