GUACAMOLE-422: Handle sending version internally.

This commit is contained in:
Nick Couchman 2019-04-10 07:08:20 -04:00
parent 2f57564f5d
commit c750b18f60
7 changed files with 8 additions and 40 deletions

View File

@ -38,6 +38,9 @@
#include <cairo/cairo.h> #include <cairo/cairo.h>
#include <stdarg.h> #include <stdarg.h>
/* The protocol version */
#define GUACAMOLE_PROTOCOL_VERSION "VERSION_1_1_0"
/* CONTROL INSTRUCTIONS */ /* CONTROL INSTRUCTIONS */
/** /**

View File

@ -94,6 +94,11 @@ static int __guac_protocol_send_args(guac_socket* socket, const char** args) {
if (guac_socket_write_string(socket, "4.args")) return -1; if (guac_socket_write_string(socket, "4.args")) return -1;
// Send protocol version
if (guac_socket_write_string(socket, ",")
|| __guac_socket_write_length_string(socket, GUACAMOLE_PROTOCOL_VERSION))
return -1;
for (i=0; args[i] != NULL; i++) { for (i=0; args[i] != NULL; i++) {
if (guac_socket_write_string(socket, ",")) if (guac_socket_write_string(socket, ","))

View File

@ -25,14 +25,6 @@
/* Client plugin arguments */ /* Client plugin arguments */
const char* GUAC_KUBERNETES_CLIENT_ARGS[] = { const char* GUAC_KUBERNETES_CLIENT_ARGS[] = {
/**
* This first argument defines the protocol version in use so that the
* client knows how to handle talking to different versions of guacd.
* If this is omitted the client may choose not to enable certain
* features.
*/
"VERSION_1_1_0",
"hostname", "hostname",
"port", "port",
"namespace", "namespace",

View File

@ -42,14 +42,6 @@
/* Client plugin arguments */ /* Client plugin arguments */
const char* GUAC_RDP_CLIENT_ARGS[] = { const char* GUAC_RDP_CLIENT_ARGS[] = {
/**
* This first argument defines the protocol version in use so that the
* client knows how to handle talking to different versions of guacd.
* If this is omitted the client may choose not to enable certain
* features.
*/
"VERSION_1_1_0",
"hostname", "hostname",
"port", "port",
"domain", "domain",

View File

@ -30,14 +30,6 @@
/* Client plugin arguments */ /* Client plugin arguments */
const char* GUAC_SSH_CLIENT_ARGS[] = { const char* GUAC_SSH_CLIENT_ARGS[] = {
/**
* This first argument defines the protocol version in use so that the
* client knows how to handle talking to different versions of guacd.
* If this is omitted the client may choose not to enable certain
* features.
*/
"VERSION_1_1_0",
"hostname", "hostname",
"host-key", "host-key",
"port", "port",

View File

@ -31,14 +31,6 @@
/* Client plugin arguments */ /* Client plugin arguments */
const char* GUAC_TELNET_CLIENT_ARGS[] = { const char* GUAC_TELNET_CLIENT_ARGS[] = {
/**
* This first argument defines the protocol version in use so that the
* client knows how to handle talking to different versions of guacd.
* If this is omitted the client may choose not to enable certain
* features.
*/
"VERSION_1_1_0",
"hostname", "hostname",
"port", "port",
"username", "username",

View File

@ -31,14 +31,6 @@
/* Client plugin arguments */ /* Client plugin arguments */
const char* GUAC_VNC_CLIENT_ARGS[] = { const char* GUAC_VNC_CLIENT_ARGS[] = {
/**
* This first argument defines the protocol version in use so that the
* client knows how to handle talking to different versions of guacd.
* If this is omitted the client may choose not to enable certain
* features.
*/
"VERSION_1_1_0",
"hostname", "hostname",
"port", "port",
"read-only", "read-only",