added 15 and 24bpp support and changes for reconnect / resize

ulab-original
Jay Sorg 13 years ago
parent 12ce9c136f
commit 5972c136bf

@ -5,7 +5,7 @@ bitmap_compression=yes
port=3389 port=3389
crypt_level=low crypt_level=low
channel_code=1 channel_code=1
max_bpp=16 max_bpp=24
#black=000000 #black=000000
#grey=d6d3ce #grey=d6d3ce
#dark_grey=808080 #dark_grey=808080
@ -67,3 +67,4 @@ username=ask
password=ask password=ask
ip=127.0.0.1 ip=127.0.0.1
port=-1 port=-1
xserverbpp=24

@ -110,6 +110,7 @@ xrdp_mm_send_login(struct xrdp_mm* self)
int rv = 0; int rv = 0;
int index = 0; int index = 0;
int count = 0; int count = 0;
int xserverbpp;
char * username = (char *)NULL; char * username = (char *)NULL;
char * password = (char *)NULL; char * password = (char *)NULL;
char * name = (char *)NULL; char * name = (char *)NULL;
@ -120,6 +121,7 @@ xrdp_mm_send_login(struct xrdp_mm* self)
username = 0; username = 0;
password = 0; password = 0;
self->code = 0; self->code = 0;
xserverbpp = 0;
count = self->login_names->count; count = self->login_names->count;
for (index = 0; index < count; index++) for (index = 0; index < count; index++)
{ {
@ -141,6 +143,10 @@ xrdp_mm_send_login(struct xrdp_mm* self)
self->code = 10; self->code = 10;
} }
} }
else if (g_strcasecmp(name, "xserverbpp") == 0)
{
xserverbpp = g_atoi(value);
}
} }
if ((username == 0) || (password == 0)) if ((username == 0) || (password == 0))
{ {
@ -161,7 +167,15 @@ xrdp_mm_send_login(struct xrdp_mm* self)
out_uint8a(s, password, index); out_uint8a(s, password, index);
out_uint16_be(s, self->wm->screen->width); out_uint16_be(s, self->wm->screen->width);
out_uint16_be(s, self->wm->screen->height); out_uint16_be(s, self->wm->screen->height);
if (xserverbpp > 0)
{
out_uint16_be(s, xserverbpp);
}
else
{
out_uint16_be(s, self->wm->screen->bpp); out_uint16_be(s, self->wm->screen->bpp);
}
/* send domain */ /* send domain */
index = g_strlen(self->wm->client_info->domain); index = g_strlen(self->wm->client_info->domain);

@ -140,11 +140,11 @@ lib_mod_connect(struct mod* mod)
mod->server_fill_rect(mod, 0, 0, mod->width, mod->height); mod->server_fill_rect(mod, 0, 0, mod->width, mod->height);
mod->server_end_update(mod); mod->server_end_update(mod);
mod->server_msg(mod, "started connecting", 0); mod->server_msg(mod, "started connecting", 0);
/* only support 8 and 16 bpp connections from rdp client */ /* only support 8, 15, 16, and 24 bpp connections from rdp client */
if (mod->bpp != 8 && mod->bpp != 16) if (mod->bpp != 8 && mod->bpp != 15 && mod->bpp != 16 && mod->bpp != 24)
{ {
mod->server_msg(mod, mod->server_msg(mod,
"error - only supporting 8 and 16 bpp rdp connections", 0); "error - only supporting 8, 15, 16, and 24 bpp rdp connections", 0);
LIB_DEBUG(mod, "out lib_mod_connect error"); LIB_DEBUG(mod, "out lib_mod_connect error");
return 1; return 1;
} }

Loading…
Cancel
Save