Send any received data to pipe.

This commit is contained in:
Michael Jumper 2014-03-02 11:12:27 -08:00
parent 38aa467233
commit 2d885fdec2
2 changed files with 19 additions and 1 deletions

View File

@ -60,6 +60,7 @@
#define Stream_SetPointer stream_set_mark #define Stream_SetPointer stream_set_mark
#define Stream_Buffer stream_get_head #define Stream_Buffer stream_get_head
#define Stream_Pointer stream_get_tail #define Stream_Pointer stream_get_tail
#define Stream_Length stream_get_length
#define wStream STREAM #define wStream STREAM
#define wMessage RDP_EVENT #define wMessage RDP_EVENT

View File

@ -115,6 +115,23 @@ void guac_svc_process_event(rdpSvcPlugin* plugin, wMessage* event) {
void guac_svc_process_receive(rdpSvcPlugin* plugin, void guac_svc_process_receive(rdpSvcPlugin* plugin,
wStream* input_stream) { 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));
} }