diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2012-05-07 11:00:32 -0700 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2012-05-07 11:00:32 -0700 |
commit | 3e422c04c6289f3f1f7cf9ce4325982b942ede7c (patch) | |
tree | 90d6d4e81caaf366d217e7adaf049623ef7e14c7 | |
parent | 9a03ab966d4d5e7883ff201dc6d455e5e7b7fb5f (diff) | |
download | xrdp-proprietary-3e422c04c6289f3f1f7cf9ce4325982b942ede7c.tar.gz xrdp-proprietary-3e422c04c6289f3f1f7cf9ce4325982b942ede7c.zip |
fixes from ArvidNorr
-rw-r--r-- | freerdp/xrdp-color.c | 8 | ||||
-rw-r--r-- | freerdp/xrdp-freerdp.c | 15 | ||||
-rw-r--r-- | xrdp/xrdp_mm.c | 26 | ||||
-rw-r--r-- | xrdp/xrdp_wm.c | 14 |
4 files changed, 40 insertions, 23 deletions
diff --git a/freerdp/xrdp-color.c b/freerdp/xrdp-color.c index 0ae11339..1bbdef43 100644 --- a/freerdp/xrdp-color.c +++ b/freerdp/xrdp-color.c @@ -187,6 +187,10 @@ convert_bitmap(int in_bpp, int out_bpp, char* bmpdata, { return bmpdata; } + if ((in_bpp == 15) && (out_bpp == 15)) + { + return bmpdata; + } g_writeln("convert_bitmap: error unknown conversion from %d to %d", in_bpp, out_bpp); return 0; @@ -265,6 +269,10 @@ convert_color(int in_bpp, int out_bpp, int in_color, int* palette) { return in_color; } + if ((in_bpp == 15) && (out_bpp == 15)) + { + return in_color; + } g_writeln("convert_color: error unknown conversion from %d to %d", in_bpp, out_bpp); return 0; diff --git a/freerdp/xrdp-freerdp.c b/freerdp/xrdp-freerdp.c index 78277e08..f7e7fd5e 100644 --- a/freerdp/xrdp-freerdp.c +++ b/freerdp/xrdp-freerdp.c @@ -139,22 +139,17 @@ lib_mod_event(struct mod* mod, int msg, long param1, long param2, param1, param2); break; case 107: - //mod->inst->rdp_send_input_mouse(mod->inst, - // MOUSE_FLAG_BUTTON4, param1, param2); + mod->inst->rdp_send_input_mouse(mod->inst, + PTRFLAGS_WHEEL | 0x0078, 0, 0); break; case 108: - //mod->inst->rdp_send_input_mouse(mod->inst, - // MOUSE_FLAG_BUTTON4 | MOUSE_FLAG_DOWN, - // param1, param2); break; case 109: - //mod->inst->rdp_send_input_mouse(mod->inst, - // MOUSE_FLAG_BUTTON5, param1, param2); + mod->inst->rdp_send_input_mouse(mod->inst, + PTRFLAGS_WHEEL | + PTRFLAGS_WHEEL_NEGATIVE | 0x0088, 0, 0); break; case 110: - //mod->inst->rdp_send_input_mouse(mod->inst, - // MOUSE_FLAG_BUTTON5 | MOUSE_FLAG_DOWN, - // param1, param2); break; } LIB_DEBUG(mod, "out lib_mod_event"); diff --git a/xrdp/xrdp_mm.c b/xrdp/xrdp_mm.c index 055d0f91..c15c4bd5 100644 --- a/xrdp/xrdp_mm.c +++ b/xrdp/xrdp_mm.c @@ -375,9 +375,8 @@ xrdp_mm_setup_mod2(struct xrdp_mm* self) int device_flags; int use_uds; - g_memset(text,0,sizeof(char) * 256); - rv = 1; - text[0] = 0; + rv = 1; /* failure */ + g_memset(text, 0, sizeof(text)); if (!g_is_wait_obj_set(self->wm->pro_layer->self_term_event)) { if (self->mod->mod_start(self->mod, self->wm->screen->width, @@ -444,7 +443,7 @@ xrdp_mm_setup_mod2(struct xrdp_mm* self) /* connect */ if (self->mod->mod_connect(self->mod) == 0) { - rv = 0; + rv = 0; /* connect success */ } } if (rv == 0) @@ -953,11 +952,12 @@ xrdp_mm_connect(struct xrdp_mm* self) char port[8]; char chansrvport[256]; - g_memset(ip,0,sizeof(char) * 256); - g_memset(errstr,0,sizeof(char) * 256); - g_memset(text,0,sizeof(char) * 256); - g_memset(port,0,sizeof(char) * 8); - rv = 0; + g_memset(ip, 0, sizeof(ip)); + g_memset(errstr, 0, sizeof(errstr)); + g_memset(text, 0, sizeof(text)); + g_memset(port, 0, sizeof(port)); + g_memset(chansrvport, 0, sizeof(chansrvport)); + rv = 0; /* success */ use_sesman = 0; names = self->login_names; values = self->login_values; @@ -1033,6 +1033,14 @@ xrdp_mm_connect(struct xrdp_mm* self) { xrdp_wm_set_login_mode(self->wm, 10); } + else + { + /* connect error */ + g_snprintf(errstr, 255, "Failure to connect to: %s port: %s", + ip, port); + xrdp_wm_log_msg(self->wm, errstr); + rv = 1 ; /* failure */ + } } if (self->wm->login_mode != 10) { diff --git a/xrdp/xrdp_wm.c b/xrdp/xrdp_wm.c index 8029d517..7d15c3d0 100644 --- a/xrdp/xrdp_wm.c +++ b/xrdp/xrdp_wm.c @@ -1475,10 +1475,16 @@ xrdp_wm_login_mode_changed(struct xrdp_wm* self) } else if (self->login_mode == 2) { - xrdp_wm_set_login_mode(self, 3); /* put the wm in connected mode */ - xrdp_wm_delete_all_childs(self); - self->dragging = 0; - xrdp_mm_connect(self->mm); + if (xrdp_mm_connect(self->mm) == 0) + { + xrdp_wm_set_login_mode(self, 3); /* put the wm in connected mode */ + xrdp_wm_delete_all_childs(self); + self->dragging = 0; + } + else + { + /* we do nothing on connect error so far */ + } } else if (self->login_mode == 10) { |