Associated client with RDPDR, add logging to stubs.

This commit is contained in:
Michael Jumper 2013-06-18 14:02:38 -07:00
parent 6d9ff1e5ee
commit 11deb82bcb
3 changed files with 20 additions and 3 deletions

View File

@ -191,7 +191,7 @@ boolean rdp_freerdp_pre_connect(freerdp* instance) {
/* Load RDPDR plugin */
if (freerdp_channels_load_plugin(channels, instance->settings,
"guac_rdpdr", NULL))
"guac_rdpdr", client))
guac_client_log_error(client,
"Failed to load guac_rdpdr plugin.");

View File

@ -62,7 +62,18 @@ DEFINE_SVC_PLUGIN(guac_rdpdr, "rdpdr",
void guac_rdpdr_process_connect(rdpSvcPlugin* plugin) {
/* STUB - init */
/* Get RDPDR plugin */
guac_rdpdrPlugin* rdpdr = (guac_rdpdrPlugin*) plugin;
/* Get client from plugin */
guac_client* client = (guac_client*)
plugin->channel_entry_points.pExtendedData;
/* Init plugin */
rdpdr->client = client;
/* Log that printing, etc. has been loaded */
guac_client_log_info(client, "guac_rdpdr connected.");
}
@ -77,9 +88,10 @@ void guac_rdpdr_process_event(rdpSvcPlugin* plugin, RDP_EVENT* event) {
void guac_rdpdr_process_receive(rdpSvcPlugin* plugin,
STREAM* input_stream) {
/*guac_rdpdrPlugin* rdpdr = (guac_rdpdrPlugin*) plugin;*/
guac_rdpdrPlugin* rdpdr = (guac_rdpdrPlugin*) plugin;
/* STUB - read packet type, dispatch based on type */
guac_client_log_info(rdpdr->client, "STUB - RDPDR data received.");
}

View File

@ -51,6 +51,11 @@ typedef struct guac_rdpdrPlugin {
*/
rdpSvcPlugin plugin;
/**
* Reference to the client owning this instance of the RDPDR plugin.
*/
guac_client* client;
/* STUB */
} guac_rdpdrPlugin;