Store channel names as NULL-terminated list. Stub out init.

This commit is contained in:
Michael Jumper 2014-03-01 22:48:15 -08:00
parent 464c94501d
commit b835299898
2 changed files with 23 additions and 6 deletions

View File

@ -27,6 +27,7 @@
#include "client.h"
#include "guac_handlers.h"
#include "guac_pointer_cursor.h"
#include "guac_string.h"
#include "rdp_bitmap.h"
#include "rdp_gdi.h"
#include "rdp_glyph.h"
@ -219,6 +220,21 @@ BOOL rdp_freerdp_pre_connect(freerdp* instance) {
}
/* Load SVC plugin instances for all static channels */
if (guac_client_data->settings.svc_names != NULL) {
char** current = guac_client_data->settings.svc_names;
do {
/* STUB */
guac_client_log_info(client,
"STUB: Creating static channel \"%s\"...",
*current);
} while (*(++current) != NULL);
}
/* Init color conversion structure */
clrconv = calloc(1, sizeof(CLRCONV));
clrconv->alpha = 1;
@ -560,6 +576,11 @@ int guac_client_init(guac_client* client, int argc, char** argv) {
if (argv[IDX_REMOTE_APP_ARGS][0] != '\0')
settings->remote_app_args = strdup(argv[IDX_REMOTE_APP_ARGS]);
/* Static virtual channels */
settings->svc_names = NULL;
if (argv[IDX_STATIC_CHANNELS][0] != '\0')
settings->svc_names = guac_split(argv[IDX_STATIC_CHANNELS], ',');
/* Session color depth */
settings->color_depth = RDP_DEFAULT_DEPTH;
if (argv[IDX_COLOR_DEPTH][0] != '\0')

View File

@ -197,12 +197,8 @@ typedef struct guac_rdp_settings {
char* remote_app_args;
/**
* The number of static virtual channels in use.
*/
int svc_count;
/**
* The names of each static virtual channel.
* NULL-terminated list of all static virtual channel names, or NULL if
* no channels whatsoever.
*/
char** svc_names;