xrdp: don't show connection log unless there is a problem
This commit is contained in:
parent
954ed3d681
commit
20124043a6
@ -137,6 +137,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,
|
||||
|
@ -68,8 +68,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");
|
||||
if (self->mod != 0)
|
||||
{
|
||||
if (self->mod_exit != 0)
|
||||
@ -92,6 +91,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 */
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
@ -526,6 +533,10 @@ xrdp_mm_setup_mod2(struct xrdp_mm *self)
|
||||
{
|
||||
rv = 0; /* connect success */
|
||||
}
|
||||
else
|
||||
{
|
||||
xrdp_wm_show_log(self->wm);
|
||||
}
|
||||
}
|
||||
|
||||
if (rv == 0)
|
||||
@ -1176,6 +1187,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);
|
||||
|
@ -1825,7 +1825,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;
|
||||
@ -1835,11 +1835,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;
|
||||
@ -1886,7 +1887,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…
Reference in New Issue
Block a user