mike-jumper commented on a change in pull request #219: GUACAMOLE-422: Add
timezone to client handshake
URL: https://github.com/apache/guacamole-server/pull/219#discussion_r275028412
##########
File path: src/protocols/kubernetes/settings.c
##########
@@ -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",
Review comment:
For a call like:
```c
guac_user_parse_args_string(user, GUAC_RDP_CLIENT_ARGS, argv,
IDX_TIMEZONE, user->info.timezone);
```
With the new timezone parameter being at the end, the `IDX_TIMEZONE` is
likely off by one, resulting in the `NULL` value at the end of
`GUAC_*_CLIENT_ARGS` being pulled in for logging rather than the actual name of
the parameter. This is probably due to the addition of `IDX_PROTOCOL_VERSION`.
Just as `guac_protocol_send_args()` has been modified to automatically
include the protocol version, I suggest also automatically parsing out the
protocol version within the code handling `connect`, storing the value
somewhere within the `guac_user` just as we do the other parts of the
handshake. This would avoid the need for protocol implementations to be aware
of this detail.
Could be as simple as:
* Verifying receipt of the expected number of arguments
* Storing `argv[0]` somewhere sensible in `guac_user`
* Using `argc - 1` and `argv + 1` for the call to `guac_client_add_user()`
Existing protocol implementations would then need zero modification, except
those that wish to check the protocol version.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services