[debian-edu-commits] debian-edu/ 07/09: xrdp: don't show connection log unless there is a problem

Dominik George natureshadow-guest at moszumanska.debian.org
Thu Oct 6 21:01:48 UTC 2016


This is an automated email from the git hooks/post-receive script.

natureshadow-guest pushed a commit to annotated tag v0.8.0
in repository xrdp.

commit 20124043a6c6535569ba4ce4aaa8674fd32bc75e
Author: Jay Sorg <jay.sorg at gmail.com>
Date:   Sun May 18 23:12:14 2014 -0700

    xrdp: don't show connection log unless there is a problem
---
 xrdp/xrdp.h    |  2 ++
 xrdp/xrdp_mm.c | 16 ++++++++++++++--
 xrdp/xrdp_wm.c | 17 +++++++++++++----
 3 files changed, 29 insertions(+), 6 deletions(-)

diff --git a/xrdp/xrdp.h b/xrdp/xrdp.h
index a778058..652192c 100644
--- a/xrdp/xrdp.h
+++ b/xrdp/xrdp.h
@@ -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,
diff --git a/xrdp/xrdp_mm.c b/xrdp/xrdp_mm.c
index 494d79d..dd66708 100644
--- a/xrdp/xrdp_mm.c
+++ b/xrdp/xrdp_mm.c
@@ -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);
diff --git a/xrdp/xrdp_wm.c b/xrdp/xrdp_wm.c
index ffc6d3a..571f815 100644
--- a/xrdp/xrdp_wm.c
+++ b/xrdp/xrdp_wm.c
@@ -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;
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/pkg-team/xrdp.git



More information about the debian-edu-commits mailing list