GUACAMOLE-422: Add protocol version as initial item passed back in args.
This commit is contained in:
parent
0ee47e0186
commit
2b68925ec9
@ -199,7 +199,7 @@ int __guac_handshake_size_handler(guac_user* user, int argc, char** argv) {
|
||||
}
|
||||
|
||||
int __guac_handshake_audio_handler(guac_user* user, int argc, char** argv) {
|
||||
|
||||
|
||||
/* Store audio mimetypes */
|
||||
user->info.audio_mimetypes = (const char**) guac_copy_mimetypes(argv, argc);
|
||||
|
||||
@ -208,7 +208,7 @@ int __guac_handshake_audio_handler(guac_user* user, int argc, char** argv) {
|
||||
}
|
||||
|
||||
int __guac_handshake_video_handler(guac_user* user, int argc, char** argv) {
|
||||
|
||||
|
||||
/* Store video mimetypes */
|
||||
user->info.video_mimetypes = (const char**) guac_copy_mimetypes(argv, argc);
|
||||
|
||||
@ -227,6 +227,9 @@ int __guac_handshake_image_handler(guac_user* user, int argc, char** argv) {
|
||||
|
||||
int __guac_handshake_timezone_handler(guac_user* user, int argc, char** argv) {
|
||||
|
||||
/* Free any past value */
|
||||
free((char *) user->info.timezone);
|
||||
|
||||
/* Store timezone, if present */
|
||||
if (argc > 0 && strcmp(argv[0], ""))
|
||||
user->info.timezone = (const char*) strdup(argv[0]);
|
||||
@ -393,6 +396,9 @@ int guac_user_handle_connection(guac_user* user, int usec_timeout) {
|
||||
if (strcmp(parser->opcode, "connect") == 0)
|
||||
break;
|
||||
|
||||
guac_user_log(user, GUAC_LOG_DEBUG, "Processing instruction: %s",
|
||||
parser->opcode);
|
||||
|
||||
/* Loop available opcodes and run handler if/when match found. */
|
||||
__guac_handshake_mapping* current = __guac_handshake_map;
|
||||
while (current->opcode != NULL) {
|
||||
|
@ -25,6 +25,14 @@
|
||||
|
||||
/* Client plugin arguments */
|
||||
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",
|
||||
"port",
|
||||
"namespace",
|
||||
@ -55,6 +63,11 @@ 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.
|
||||
*/
|
||||
|
@ -42,6 +42,14 @@
|
||||
|
||||
/* Client plugin arguments */
|
||||
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",
|
||||
"port",
|
||||
"domain",
|
||||
@ -124,6 +132,11 @@ 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.
|
||||
*/
|
||||
|
@ -30,6 +30,14 @@
|
||||
|
||||
/* Client plugin arguments */
|
||||
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",
|
||||
"host-key",
|
||||
"port",
|
||||
@ -66,6 +74,11 @@ const char* GUAC_SSH_CLIENT_ARGS[] = {
|
||||
};
|
||||
|
||||
enum SSH_ARGS_IDX {
|
||||
|
||||
/**
|
||||
* The protocol version
|
||||
*/
|
||||
IDX_PROTOCOL_VERSION,
|
||||
|
||||
/**
|
||||
* The hostname to connect to. Required.
|
||||
|
@ -31,6 +31,14 @@
|
||||
|
||||
/* Client plugin arguments */
|
||||
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",
|
||||
"port",
|
||||
"username",
|
||||
@ -60,6 +68,11 @@ 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.
|
||||
*/
|
||||
|
@ -31,6 +31,14 @@
|
||||
|
||||
/* Client plugin arguments */
|
||||
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",
|
||||
"port",
|
||||
"read-only",
|
||||
@ -83,6 +91,11 @@ 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.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user