diff --git a/src/protocols/rdp/compat/winpr-stream.h b/src/protocols/rdp/compat/winpr-stream.h index 163cbc16..ffe5c1d8 100644 --- a/src/protocols/rdp/compat/winpr-stream.h +++ b/src/protocols/rdp/compat/winpr-stream.h @@ -60,6 +60,7 @@ #define Stream_SetPointer stream_set_mark #define Stream_Buffer stream_get_head #define Stream_Pointer stream_get_tail +#define Stream_Length stream_get_length #define wStream STREAM #define wMessage RDP_EVENT diff --git a/src/protocols/rdp/guac_svc/svc_service.c b/src/protocols/rdp/guac_svc/svc_service.c index a54c1e3a..39997724 100644 --- a/src/protocols/rdp/guac_svc/svc_service.c +++ b/src/protocols/rdp/guac_svc/svc_service.c @@ -115,6 +115,23 @@ void guac_svc_process_event(rdpSvcPlugin* plugin, wMessage* event) { void guac_svc_process_receive(rdpSvcPlugin* plugin, wStream* input_stream) { - /* STUB */ + + /* Get corresponding guac_rdp_svc */ + guac_svcPlugin* svc_plugin = (guac_svcPlugin*) plugin; + guac_rdp_svc* svc = svc_plugin->svc; + + /* Fail if output not created */ + if (svc->output_pipe == NULL) { + guac_client_log_error(svc->client, + "Output for channel \"%s\" dropped.", + svc->name); + return; + } + + /* Send blob */ + guac_protocol_send_blob(svc->client->socket, svc->output_pipe, + Stream_Buffer(input_stream), + Stream_Length(input_stream)); + }