From f49e2058dfd857b441daa4b18bcde6e341d8b9da Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Tue, 1 Dec 2015 23:10:09 -0800 Subject: [PATCH] xrdp: change when using xrdp.ini hidelogwindow --- xrdp/xrdp_mm.c | 13 +++++++++++++ xrdp/xrdp_wm.c | 5 +++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/xrdp/xrdp_mm.c b/xrdp/xrdp_mm.c index 56d2623f..cfee5ee8 100644 --- a/xrdp/xrdp_mm.c +++ b/xrdp/xrdp_mm.c @@ -578,6 +578,10 @@ xrdp_mm_setup_mod2(struct xrdp_mm *self) else { xrdp_wm_show_log(self->wm); + if (self->wm->hide_log_window) + { + rv = 1; + } } } @@ -1231,6 +1235,10 @@ xrdp_mm_process_login_response(struct xrdp_mm *self, struct stream *s) log_message(LOG_LEVEL_INFO,"xrdp_mm_process_login_response: " "login failed"); xrdp_wm_show_log(self->wm); + if (self->wm->hide_log_window) + { + rv = 1; + } } cleanup_sesman_connection(self); @@ -2155,6 +2163,11 @@ xrdp_mm_check_wait_objs(struct xrdp_mm *self) if (trans_check_wait_objs(self->sesman_trans) != 0) { self->delete_sesman_trans = 1; + if (self->wm->hide_log_window) + { + /* if hide_log_window, this is fatal */ + rv = 1; + } } } diff --git a/xrdp/xrdp_wm.c b/xrdp/xrdp_wm.c index e3af0f05..d71f5020 100644 --- a/xrdp/xrdp_wm.c +++ b/xrdp/xrdp_wm.c @@ -560,7 +560,7 @@ xrdp_wm_init(struct xrdp_wm *self) xrdp_wm_load_static_pointers(self); self->screen->bg_color = self->xrdp_config->cfg_globals.ls_top_window_bg_color; - if (self->session->client_info->rdp_autologin) + if (self->session->client_info->rdp_autologin || self->hide_log_window) { /* * NOTE: this should eventually be accessed from self->xrdp_config @@ -576,7 +576,8 @@ xrdp_wm_init(struct xrdp_wm *self) values->auto_free = 1; /* look for module name to be loaded */ - if (autorun_name[0] != 0) { + if (autorun_name[0] != 0) + { /* if autorun is configured in xrdp.ini, we enforce that module to be loaded */ g_strncpy(section_name, autorun_name, 255); }