summaryrefslogtreecommitdiffstats
path: root/xrdp/xrdp_mm.c
diff options
context:
space:
mode:
Diffstat (limited to 'xrdp/xrdp_mm.c')
-rw-r--r--xrdp/xrdp_mm.c33
1 files changed, 24 insertions, 9 deletions
diff --git a/xrdp/xrdp_mm.c b/xrdp/xrdp_mm.c
index a2e7446c..26e5c028 100644
--- a/xrdp/xrdp_mm.c
+++ b/xrdp/xrdp_mm.c
@@ -466,6 +466,7 @@ xrdp_mm_setup_mod1(struct xrdp_mm *self)
self->mod->server_paint_rect_bpp = server_paint_rect_bpp;
self->mod->server_composite = server_composite;
self->mod->server_paint_rects = server_paint_rects;
+ self->mod->si = (tintptr) &(self->wm->session->si);
}
}
@@ -577,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;
+ }
}
}
@@ -1116,15 +1121,16 @@ xrdp_mm_connect_chansrv(struct xrdp_mm *self, char *ip, char *port)
{
/* unix socket */
self->chan_trans = trans_create(TRANS_MODE_UNIX, 8192, 8192);
- self->chan_trans->is_term = g_is_term;
}
else
{
/* tcp */
self->chan_trans = trans_create(TRANS_MODE_TCP, 8192, 8192);
- self->chan_trans->is_term = g_is_term;
}
+ self->chan_trans->is_term = g_is_term;
+ self->chan_trans->si = &(self->wm->session->si);
+ self->chan_trans->my_source = XRDP_SOURCE_CHANSRV;
self->chan_trans->trans_data_in = xrdp_mm_chan_data_in;
self->chan_trans->header_size = 8;
self->chan_trans->callback_data = self;
@@ -1229,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);
@@ -1448,7 +1458,7 @@ access_control(char *username, char *password, char *srv)
if (reply > 0)
{
/* We wait in 5 sec for a reply from sesman*/
- if (g_tcp_can_recv(socket, 5000))
+ if (g_sck_can_recv(socket, 5000))
{
reply = g_tcp_recv(socket, in_s->end, 500, 0);
@@ -1973,7 +1983,7 @@ xrdp_mm_connect(struct xrdp_mm *self)
if (xrdp_mm_setup_mod2(self) == 0)
{
xrdp_wm_set_login_mode(self->wm, 10);
- rv = 0; /*sucess*/
+ rv = 0; /*success*/
}
else
{
@@ -2004,7 +2014,7 @@ xrdp_mm_connect(struct xrdp_mm *self)
xrdp_mm_connect_chansrv(self, "", chansrvport);
}
- log_message(LOG_LEVEL_DEBUG,"returnvalue from xrdp_mm_connect %d", rv);
+ log_message(LOG_LEVEL_DEBUG,"return value from xrdp_mm_connect %d", rv);
return rv;
}
@@ -2153,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;
+ }
}
}
@@ -2818,7 +2833,7 @@ server_draw_line(struct xrdp_mod *mod, int x1, int y1, int x2, int y2)
/*****************************************************************************/
int DEFAULT_CC
-server_add_char(struct xrdp_mod *mod, int font, int charactor,
+server_add_char(struct xrdp_mod *mod, int font, int character,
int offset, int baseline,
int width, int height, char *data)
{
@@ -2832,7 +2847,7 @@ server_add_char(struct xrdp_mod *mod, int font, int charactor,
fi.data = data;
fi.bpp = 1;
return libxrdp_orders_send_font(((struct xrdp_wm *)mod->wm)->session,
- &fi, font, charactor);
+ &fi, font, character);
}
/*****************************************************************************/
@@ -3455,7 +3470,7 @@ server_monitored_desktop(struct xrdp_mod *mod,
/*****************************************************************************/
int DEFAULT_CC
-server_add_char_alpha(struct xrdp_mod* mod, int font, int charactor,
+server_add_char_alpha(struct xrdp_mod* mod, int font, int character,
int offset, int baseline,
int width, int height, char* data)
{
@@ -3469,5 +3484,5 @@ server_add_char_alpha(struct xrdp_mod* mod, int font, int charactor,
fi.data = data;
fi.bpp = 8;
return libxrdp_orders_send_font(((struct xrdp_wm*)mod->wm)->session,
- &fi, font, charactor);
+ &fi, font, character);
}