xrdp: don't show connection log unless there is a problem

Conflicts:

	xrdp/xrdp_mm.c
ulab-next
Jay Sorg 11 years ago
parent 5717845837
commit 59fa8df434

@ -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,

@ -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);

@ -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;
}

Loading…
Cancel
Save