From b94b84956b0828cf4e1234b0ec2843757668a55e Mon Sep 17 00:00:00 2001 From: James Muehlner Date: Mon, 1 Jul 2013 10:46:30 -0700 Subject: [PATCH] Ticket #241: Added server-side support for vnc repeaters. --- src/protocols/vnc/client.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/protocols/vnc/client.c b/src/protocols/vnc/client.c index d2219b9a..cf0f2c96 100644 --- a/src/protocols/vnc/client.c +++ b/src/protocols/vnc/client.c @@ -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]);