Ticket #241: Added server-side support for vnc repeaters.

This commit is contained in:
James Muehlner 2013-07-01 10:46:30 -07:00
parent bfe28460a7
commit b94b84956b

View File

@ -57,6 +57,8 @@ const char* GUAC_CLIENT_ARGS[] = {
"password",
"swap-red-blue",
"color-depth",
"dest-host",
"dest-port",
NULL
};
@ -76,7 +78,7 @@ int guac_client_init(guac_client* client, int argc, char** argv) {
/*** PARSE ARGUMENTS ***/
if (argc < 7) {
if (argc < 9) {
guac_protocol_send_error(client->socket, "Wrong argument count received.");
guac_socket_flush(client->socket);
return 1;
@ -131,6 +133,13 @@ int guac_client_init(guac_client* client, int argc, char** argv) {
rfb_client->serverHost = strdup(argv[0]);
rfb_client->serverPort = atoi(argv[1]);
/* Set repeater parameters if specified */
if(argv[7][0] != '\0')
rfb_client->destHost = strdup(argv[7]);
if(argv[8][0] != '\0')
rfb_client->destPort = atoi(argv[8]);
/* Set encodings if specified */
if (argv[3][0] != '\0')
rfb_client->appData.encodingsString = guac_client_data->encodings = strdup(argv[3]);