Merge pull request #316 from proski/32bpp

Make it possible to use Xvnc with 32 bpp
ulab-next-nosound
Itamar Reis Peixoto 9 years ago
commit 70920b836e

@ -137,6 +137,7 @@ scp_session_set_bpp(struct SCP_SESSION *s, tui8 bpp)
case 15:
case 16:
case 24:
case 32:
s->bpp = bpp;
default:
return 1;

@ -252,7 +252,14 @@ scp_v0s_accept(struct SCP_CONNECTION *c, struct SCP_SESSION **s, int skipVchk)
scp_session_set_height(session, sz);
/* bpp */
in_uint16_be(c->in_s, sz);
scp_session_set_bpp(session, (tui8)sz);
if (0 != scp_session_set_bpp(session, (tui8)sz))
{
scp_session_destroy(session);
log_message(LOG_LEVEL_WARNING,
"[v0:%d] connection aborted: unsupported bpp: %d",
__LINE__, (tui8)sz);
return SCP_SERVER_STATE_INTERNAL_ERR;
}
if (s_check_rem(c->in_s, 2))
{

@ -131,6 +131,14 @@ enum SCP_SERVER_STATES_E scp_v1s_accept(struct SCP_CONNECTION *c, struct SCP_SES
in_uint16_be(c->in_s, cmd);
scp_session_set_height(session, cmd);
in_uint8(c->in_s, sz);
if (0 != scp_session_set_bpp(session, sz))
{
scp_session_destroy(session);
log_message(LOG_LEVEL_WARNING,
"[v1s:%d] connection aborted: unsupported bpp: %d",
__LINE__, sz);
return SCP_SERVER_STATE_INTERNAL_ERR;
}
scp_session_set_bpp(session, sz);
in_uint8(c->in_s, sz);
scp_session_set_rsr(session, sz);

@ -993,12 +993,18 @@ lib_mod_connect(struct vnc *v)
v->server_msg(v, "VNC started connecting", 0);
check_sec_result = 1;
/* only support 8 and 16 bpp connections from rdp client */
if ((v->server_bpp != 8) && (v->server_bpp != 15) &&
(v->server_bpp != 16) && (v->server_bpp != 24))
{
v->server_msg(v, "VNC error - only supporting 8, 15, 16 and 24 bpp rdp "
"connections", 0);
/* check if bpp is supported for rdp connection */
switch (v->server_bpp)
{
case 8:
case 15:
case 16:
case 24:
case 32:
break;
default:
v->server_msg(v, "VNC error - only supporting 8, 15, 16, 24 and 32 "
"bpp rdp connections", 0);
return 1;
}

Loading…
Cancel
Save