Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/neutrinolabs/NeutrinoRDP.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2019-04-10 09:32:13 +0300
committerJay Sorg <jay.sorg@gmail.com>2019-04-10 09:32:13 +0300
commit8d2e9258b3aab9155d711c91bbe7086570aadccc (patch)
tree5f5585aede8232a04c6bd8d03bb6912bb8ae82d1 /libfreerdp-core
parentcebc9d8f3a12c14f250d0e6c3d811f5ed173b7a3 (diff)
add suppress output support
Diffstat (limited to 'libfreerdp-core')
-rw-r--r--libfreerdp-core/freerdp.c6
-rw-r--r--libfreerdp-core/rdp.c12
-rw-r--r--libfreerdp-core/rdp.h1
3 files changed, 13 insertions, 6 deletions
diff --git a/libfreerdp-core/freerdp.c b/libfreerdp-core/freerdp.c
index ea9ffe9..ba4acb2 100644
--- a/libfreerdp-core/freerdp.c
+++ b/libfreerdp-core/freerdp.c
@@ -147,6 +147,11 @@ static int freerdp_send_invalidate(freerdp* instance, int code, int x, int y, in
return rdp_send_invalidate(instance->context->rdp, code, x, y, w, h);
}
+static int freerdp_send_suppress_output(freerdp* instance, int code, int left, int top, int right, int bottom)
+{
+ return rdp_send_suppress_output(instance->context->rdp, code, left, top, right, bottom);
+}
+
tbool freerdp_disconnect(freerdp* instance)
{
rdpRdp* rdp;
@@ -226,6 +231,7 @@ freerdp* freerdp_new()
instance->SendChannelData = freerdp_send_channel_data;
instance->SendFrameAck = freerdp_send_frame_ack;
instance->SendInvalidate = freerdp_send_invalidate;
+ instance->SendSuppressOutput = freerdp_send_suppress_output;
}
return instance;
diff --git a/libfreerdp-core/rdp.c b/libfreerdp-core/rdp.c
index 0b0480e..854c6fb 100644
--- a/libfreerdp-core/rdp.c
+++ b/libfreerdp-core/rdp.c
@@ -958,10 +958,11 @@ int rdp_send_invalidate(rdpRdp* rdp, int code, int x, int y, int w, int h)
}
/* this one is not hooked up yet */
-int rdp_send_suppress_output(rdpRdp* rdp, int code, int x, int y, int w, int h)
+int rdp_send_suppress_output(rdpRdp* rdp, int code, int left, int top, int right, int bottom)
{
STREAM* s;
+ LLOGLN(0, ("rdp_send_suppress_output: code %d left %d top %d right %d bottom %d", code, left, top, right, bottom));
s = rdp_data_pdu_init(rdp);
stream_write_uint32(s, code);
switch (code)
@@ -969,11 +970,10 @@ int rdp_send_suppress_output(rdpRdp* rdp, int code, int x, int y, int w, int h)
case 0: /* shut the server up */
break;
case 1: /* receive data again */
- LLOGLN(0, ("x %d y %d w %d h %d", x, y, w, h));
- stream_write_uint16(s, x);
- stream_write_uint16(s, y);
- stream_write_uint16(s, w);
- stream_write_uint16(s, h);
+ stream_write_uint16(s, left);
+ stream_write_uint16(s, top);
+ stream_write_uint16(s, right);
+ stream_write_uint16(s, bottom);
break;
}
rdp_send_data_pdu(rdp, s, 35, rdp->mcs->user_id); /* RDP_DATA_PDU_SUPPRESS_OUTPUT */
diff --git a/libfreerdp-core/rdp.h b/libfreerdp-core/rdp.h
index d52d177..f09fe4c 100644
--- a/libfreerdp-core/rdp.h
+++ b/libfreerdp-core/rdp.h
@@ -194,6 +194,7 @@ void rdp_recv(rdpRdp* rdp);
int rdp_send_channel_data(rdpRdp* rdp, int channel_id, uint8* data, int size);
int rdp_send_frame_ack(rdpRdp* rdp, int frame);
int rdp_send_invalidate(rdpRdp* rdp, int code, int x, int y, int w, int h);
+int rdp_send_suppress_output(rdpRdp* rdp, int code, int left, int top, int right, int bottom);
boolean rdp_recv_out_of_sequence_pdu(rdpRdp* rdp, STREAM* s);