|
|
@ -132,6 +132,7 @@ rdpup_disconnect(void)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int index;
|
|
|
|
int index;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LLOGLN(0, ("rdpup_disconnect:"));
|
|
|
|
RemoveEnabledDevice(g_sck);
|
|
|
|
RemoveEnabledDevice(g_sck);
|
|
|
|
g_connected = 0;
|
|
|
|
g_connected = 0;
|
|
|
|
g_tcp_close(g_sck);
|
|
|
|
g_tcp_close(g_sck);
|
|
|
@ -293,12 +294,14 @@ rdpup_send(char *data, int len)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
LLOGLN(0, ("rdpup_send: g_tcp_send failed(returned -1)"));
|
|
|
|
rdpup_disconnect();
|
|
|
|
rdpup_disconnect();
|
|
|
|
return 1;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (sent == 0)
|
|
|
|
else if (sent == 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
LLOGLN(0, ("rdpup_send: g_tcp_send failed(returned zero)"));
|
|
|
|
rdpup_disconnect();
|
|
|
|
rdpup_disconnect();
|
|
|
|
return 1;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -425,12 +428,14 @@ rdpup_recv(char *data, int len)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
LLOGLN(0, ("rdpup_recv: g_tcp_recv failed(returned -1)"));
|
|
|
|
rdpup_disconnect();
|
|
|
|
rdpup_disconnect();
|
|
|
|
return 1;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (rcvd == 0)
|
|
|
|
else if (rcvd == 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
LLOGLN(0, ("rdpup_recv: g_tcp_recv failed(returned 0)"));
|
|
|
|
rdpup_disconnect();
|
|
|
|
rdpup_disconnect();
|
|
|
|
return 1;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1507,7 +1512,7 @@ rdpup_create_os_surface_bpp(int rdpindex, int width, int height, int bpp)
|
|
|
|
out_uint32_le(g_out_s, rdpindex);
|
|
|
|
out_uint32_le(g_out_s, rdpindex);
|
|
|
|
out_uint16_le(g_out_s, width);
|
|
|
|
out_uint16_le(g_out_s, width);
|
|
|
|
out_uint16_le(g_out_s, height);
|
|
|
|
out_uint16_le(g_out_s, height);
|
|
|
|
out_uint8s(g_out_s, bpp);
|
|
|
|
out_uint8(g_out_s, bpp);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1857,7 +1862,7 @@ rdpup_send_alpha_area(struct image_data* id, int x, int y, int w, int h)
|
|
|
|
out_uint16_le(g_out_s, lh);
|
|
|
|
out_uint16_le(g_out_s, lh);
|
|
|
|
out_uint16_le(g_out_s, 0);
|
|
|
|
out_uint16_le(g_out_s, 0);
|
|
|
|
out_uint16_le(g_out_s, 0);
|
|
|
|
out_uint16_le(g_out_s, 0);
|
|
|
|
out_uint8s(g_out_s, 8);
|
|
|
|
out_uint8(g_out_s, 8);
|
|
|
|
lx += 64;
|
|
|
|
lx += 64;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ly += 64;
|
|
|
|
ly += 64;
|
|
|
@ -2465,7 +2470,7 @@ rdpup_composite(short srcidx, int srcformat, short srcwidth, CARD8 srcrepeat,
|
|
|
|
out_uint16_le(g_out_s, srcidx);
|
|
|
|
out_uint16_le(g_out_s, srcidx);
|
|
|
|
out_uint32_le(g_out_s, srcformat);
|
|
|
|
out_uint32_le(g_out_s, srcformat);
|
|
|
|
out_uint16_le(g_out_s, srcwidth);
|
|
|
|
out_uint16_le(g_out_s, srcwidth);
|
|
|
|
out_uint8s(g_out_s, srcrepeat);
|
|
|
|
out_uint8(g_out_s, srcrepeat);
|
|
|
|
if (srctransform == 0)
|
|
|
|
if (srctransform == 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
out_uint8s(g_out_s, 10 * 4);
|
|
|
|
out_uint8s(g_out_s, 10 * 4);
|
|
|
@ -2483,12 +2488,12 @@ rdpup_composite(short srcidx, int srcformat, short srcwidth, CARD8 srcrepeat,
|
|
|
|
out_uint32_le(g_out_s, srctransform->matrix[2][1]);
|
|
|
|
out_uint32_le(g_out_s, srctransform->matrix[2][1]);
|
|
|
|
out_uint32_le(g_out_s, srctransform->matrix[2][2]);
|
|
|
|
out_uint32_le(g_out_s, srctransform->matrix[2][2]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
out_uint8s(g_out_s, mskflags);
|
|
|
|
out_uint8(g_out_s, mskflags);
|
|
|
|
out_uint16_le(g_out_s, mskidx);
|
|
|
|
out_uint16_le(g_out_s, mskidx);
|
|
|
|
out_uint32_le(g_out_s, mskformat);
|
|
|
|
out_uint32_le(g_out_s, mskformat);
|
|
|
|
out_uint16_le(g_out_s, mskwidth);
|
|
|
|
out_uint16_le(g_out_s, mskwidth);
|
|
|
|
out_uint8s(g_out_s, mskrepeat);
|
|
|
|
out_uint8(g_out_s, mskrepeat);
|
|
|
|
out_uint8s(g_out_s, op);
|
|
|
|
out_uint8(g_out_s, op);
|
|
|
|
out_uint16_le(g_out_s, srcx);
|
|
|
|
out_uint16_le(g_out_s, srcx);
|
|
|
|
out_uint16_le(g_out_s, srcy);
|
|
|
|
out_uint16_le(g_out_s, srcy);
|
|
|
|
out_uint16_le(g_out_s, mskx);
|
|
|
|
out_uint16_le(g_out_s, mskx);
|
|
|
|