diff --git a/src/libguac/user-handshake.c b/src/libguac/user-handshake.c index cf96d347..a7805b21 100644 --- a/src/libguac/user-handshake.c +++ b/src/libguac/user-handshake.c @@ -234,7 +234,7 @@ int guac_user_handle_connection(guac_user* user, int usec_timeout) { guac_socket* socket = user->socket; guac_client* client = user->client; - + /* Send args */ if (guac_protocol_send_args(socket, client->args) || guac_socket_flush(socket)) { @@ -286,9 +286,10 @@ int guac_user_handle_connection(guac_user* user, int usec_timeout) { /* Acknowledge connection availability */ guac_protocol_send_ready(socket, client->connection_id); guac_socket_flush(socket); - - /* Attempt join */ - if (guac_client_add_user(client, user, parser->argc, parser->argv)) + + /* Check return value from join attempt */ + if (guac_client_add_user(client, user, (parser->argc - 1), + parser->argv + 1)) guac_client_log(client, GUAC_LOG_ERROR, "User \"%s\" could NOT " "join connection \"%s\"", user->user_id, client->connection_id); diff --git a/src/protocols/kubernetes/settings.c b/src/protocols/kubernetes/settings.c index ce7f6977..0ae3dc23 100644 --- a/src/protocols/kubernetes/settings.c +++ b/src/protocols/kubernetes/settings.c @@ -54,11 +54,6 @@ const char* GUAC_KUBERNETES_CLIENT_ARGS[] = { }; enum KUBERNETES_ARGS_IDX { - - /** - * The protocol version provided to the client. - */ - IDX_PROTOCOL_VERSION, /** * The hostname to connect to. Required. diff --git a/src/protocols/rdp/rdp_settings.c b/src/protocols/rdp/rdp_settings.c index f45b3a43..51214a61 100644 --- a/src/protocols/rdp/rdp_settings.c +++ b/src/protocols/rdp/rdp_settings.c @@ -123,11 +123,6 @@ const char* GUAC_RDP_CLIENT_ARGS[] = { }; enum RDP_ARGS_IDX { - - /** - * The protocol version sent to the client. - */ - IDX_PROTOCOL_VERSION, /** * The hostname to connect to. diff --git a/src/protocols/ssh/settings.c b/src/protocols/ssh/settings.c index b69ddd6c..a0af9f9b 100644 --- a/src/protocols/ssh/settings.c +++ b/src/protocols/ssh/settings.c @@ -66,11 +66,6 @@ const char* GUAC_SSH_CLIENT_ARGS[] = { }; enum SSH_ARGS_IDX { - - /** - * The protocol version - */ - IDX_PROTOCOL_VERSION, /** * The hostname to connect to. Required. diff --git a/src/protocols/telnet/settings.c b/src/protocols/telnet/settings.c index 9d334df2..85b4fb85 100644 --- a/src/protocols/telnet/settings.c +++ b/src/protocols/telnet/settings.c @@ -59,11 +59,6 @@ const char* GUAC_TELNET_CLIENT_ARGS[] = { }; enum TELNET_ARGS_IDX { - - /** - * The protocol version provided by the client. - */ - IDX_PROTOCOL_VERSION, /** * The hostname to connect to. Required. diff --git a/src/protocols/vnc/settings.c b/src/protocols/vnc/settings.c index c39aa730..623e6688 100644 --- a/src/protocols/vnc/settings.c +++ b/src/protocols/vnc/settings.c @@ -82,11 +82,6 @@ const char* GUAC_VNC_CLIENT_ARGS[] = { }; enum VNC_ARGS_IDX { - - /** - * The protocol version provided to the client. - */ - IDX_PROTOCOL_VERSION, /** * The hostname of the VNC server (or repeater) to connect to.