summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2014-05-19 23:47:38 -0700
committerJay Sorg <jay.sorg@gmail.com>2014-05-19 23:47:38 -0700
commit59fa8df434def610efcf08b04204c40740652117 (patch)
tree344991ed6a1e70bebbb802d52c9cd3fd27863e9c
parent57178458371620afcef5f81fc12f1d92e3432a9c (diff)
downloadxrdp-proprietary-59fa8df434def610efcf08b04204c40740652117.tar.gz
xrdp-proprietary-59fa8df434def610efcf08b04204c40740652117.zip
xrdp: don't show connection log unless there is a problem
Conflicts: xrdp/xrdp_mm.c
-rw-r--r--xrdp/xrdp.h2
-rw-r--r--xrdp/xrdp_mm.c15
-rw-r--r--xrdp/xrdp_wm.c17
3 files changed, 29 insertions, 5 deletions
diff --git a/xrdp/xrdp.h b/xrdp/xrdp.h
index 32129c01..67488a60 100644
--- a/xrdp/xrdp.h
+++ b/xrdp/xrdp.h
@@ -138,6 +138,8 @@ callback(long id, int msg, long param1, long param2, long param3, long param4);
int APP_CC
xrdp_wm_delete_all_childs(struct xrdp_wm* self);
int APP_CC
+xrdp_wm_show_log(struct xrdp_wm *self);
+int APP_CC
xrdp_wm_log_msg(struct xrdp_wm* self, char* msg);
int APP_CC
xrdp_wm_get_wait_objs(struct xrdp_wm* self, tbus* robjs, int* rc,
diff --git a/xrdp/xrdp_mm.c b/xrdp/xrdp_mm.c
index 65c2f3d6..1054ba2e 100644
--- a/xrdp/xrdp_mm.c
+++ b/xrdp/xrdp_mm.c
@@ -105,7 +105,7 @@ xrdp_mm_sync_load(long param1, long param2)
static void APP_CC
xrdp_mm_module_cleanup(struct xrdp_mm *self)
{
- log_message(LOG_LEVEL_DEBUG,"xrdp_mm_module_cleanup");
+ log_message(LOG_LEVEL_DEBUG, "xrdp_mm_module_cleanup");
/* shutdown thread */
deinit_xrdp_encoder(self);
@@ -132,6 +132,14 @@ xrdp_mm_module_cleanup(struct xrdp_mm *self)
self->mod_exit = 0;
self->mod = 0;
self->mod_handle = 0;
+
+ if (self->wm->hide_log_window)
+ {
+ /* make sure autologin is off */
+ self->wm->session->client_info->rdp_autologin = 0;
+ xrdp_wm_set_login_mode(self->wm, 0); /* reset session */
+ }
+
}
/*****************************************************************************/
@@ -566,6 +574,10 @@ xrdp_mm_setup_mod2(struct xrdp_mm *self)
{
rv = 0; /* connect success */
}
+ else
+ {
+ xrdp_wm_show_log(self->wm);
+ }
}
if (rv == 0)
@@ -1216,6 +1228,7 @@ xrdp_mm_process_login_response(struct xrdp_mm *self, struct stream *s)
"login failed");
log_message(LOG_LEVEL_INFO,"xrdp_mm_process_login_response: "
"login failed");
+ xrdp_wm_show_log(self->wm);
}
cleanup_sesman_connection(self);
diff --git a/xrdp/xrdp_wm.c b/xrdp/xrdp_wm.c
index 99aabe99..13156ebe 100644
--- a/xrdp/xrdp_wm.c
+++ b/xrdp/xrdp_wm.c
@@ -1864,7 +1864,7 @@ void add_string_to_logwindow(char *msg, struct list *log)
/*****************************************************************************/
int APP_CC
-xrdp_wm_log_msg(struct xrdp_wm *self, char *msg)
+xrdp_wm_show_log(struct xrdp_wm *self)
{
struct xrdp_bitmap *but;
int w;
@@ -1874,11 +1874,12 @@ xrdp_wm_log_msg(struct xrdp_wm *self, char *msg)
if (self->hide_log_window)
{
+ /* make sure autologin is off */
+ self->session->client_info->rdp_autologin = 0;
+ xrdp_wm_set_login_mode(self, 0); /* reset session */
return 0;
}
- add_string_to_logwindow(msg, self->log);
-
if (self->log_wnd == 0)
{
w = DEFAULT_WND_LOG_W;
@@ -1925,7 +1926,15 @@ xrdp_wm_log_msg(struct xrdp_wm *self, char *msg)
xrdp_wm_set_focused(self, self->log_wnd);
xrdp_bitmap_invalidate(self->log_wnd, 0);
- g_sleep(100);
+
+ return 0;
+}
+
+/*****************************************************************************/
+int APP_CC
+xrdp_wm_log_msg(struct xrdp_wm *self, char *msg)
+{
+ add_string_to_logwindow(msg, self->log);
return 0;
}