Actually load guacsvc plugin for each static channel.

This commit is contained in:
Michael Jumper 2014-03-02 10:09:32 -08:00
parent cc5793a39b
commit 4b1c8ec7ff
3 changed files with 30 additions and 9 deletions

View File

@ -33,6 +33,7 @@
#include "rdp_glyph.h" #include "rdp_glyph.h"
#include "rdp_keymap.h" #include "rdp_keymap.h"
#include "rdp_pointer.h" #include "rdp_pointer.h"
#include "rdp_svc.h"
#include <errno.h> #include <errno.h>
#include <pthread.h> #include <pthread.h>
@ -226,10 +227,22 @@ BOOL rdp_freerdp_pre_connect(freerdp* instance) {
char** current = guac_client_data->settings.svc_names; char** current = guac_client_data->settings.svc_names;
do { do {
/* STUB */ guac_rdp_svc* svc = guac_rdp_alloc_svc(client, *current);
guac_client_log_info(client,
"STUB: Creating static channel \"%s\"...", /* Attempt to load guacsvc plugin for new static channel */
*current); if (freerdp_channels_load_plugin(channels, instance->settings,
"guacsvc", svc)) {
guac_client_log_error(client,
"Failed to load guacsvc plugin for channel \"%s\".",
svc->name);
guac_rdp_free_svc(svc);
}
/* Log success */
else {
guac_client_log_info(client, "Created static channel \"%s\"...",
svc->name);
}
} while (*(++current) != NULL); } while (*(++current) != NULL);

View File

@ -103,11 +103,11 @@ void guac_svc_process_terminate(rdpSvcPlugin* plugin) {
free(plugin); free(plugin);
} }
void guac_rdpdr_process_event(rdpSvcPlugin* plugin, wMessage* event) { void guac_svc_process_event(rdpSvcPlugin* plugin, wMessage* event) {
freerdp_event_free(event); freerdp_event_free(event);
} }
void guac_rdpdr_process_receive(rdpSvcPlugin* plugin, void guac_svc_process_receive(rdpSvcPlugin* plugin,
wStream* input_stream) { wStream* input_stream) {
/* STUB */ /* STUB */
} }

View File

@ -33,12 +33,20 @@
#endif #endif
guac_rdp_svc* guac_rdp_alloc_svc(guac_client* client, char* name) { guac_rdp_svc* guac_rdp_alloc_svc(guac_client* client, char* name) {
/* STUB */
return NULL; guac_rdp_svc* svc = malloc(sizeof(guac_rdp_svc));
svc->client = client;
svc->name = strdup(name);
svc->input_pipe = NULL;
svc->output_pipe = NULL;
return svc;
} }
void guac_rdp_free_svc(guac_rdp_svc* svc) { void guac_rdp_free_svc(guac_rdp_svc* svc) {
/* STUB */ free(svc->name);
free(svc);
} }
void guac_rdp_add_svc(guac_client* client, guac_rdp_svc* svc) { void guac_rdp_add_svc(guac_client* client, guac_rdp_svc* svc) {