necouchman commented on a change in pull request #228:
URL: https://github.com/apache/guacamole-server/pull/228#discussion_r448580307



##########
File path: src/libguac/client.c
##########
@@ -478,6 +478,44 @@ int guac_client_load_plugin(guac_client* client, const 
char* protocol) {
 
 }
 
+/**
+ * Callback function which is invoked by guac_client_owner_send_required() to
+ * send the required parameters to the specified user, who is the owner of the
+ * client session.
+ * 
+ * @param user
+ *     The guac_user that will receive the required parameters, who is the 
owner
+ *     of the client.
+ * 
+ * @param data
+ *     Pointer to a NULL-terminated array of required parameters that will be
+ *     passed on to the owner to continue the connection.
+ * 
+ * @return
+ *     A pointed to the integer containing the return status of the send
+ *     operation.
+ */
+static void* guac_client_owner_send_required_callback(guac_user* user, void* 
data) {
+    
+    const char** required = (const char **) data;
+    
+    /* Send required parameters to owner. */
+    guac_protocol_send_required(user->socket, required);
+    
+    return NULL;
+    
+}
+
+int guac_client_owner_send_required(guac_client* client, const char** 
required) {
+
+    /* Don't send required instruction if client does not support it. */
+    if (!guac_client_owner_supports_required(client))
+        return -1;
+    
+    return *(int*) guac_client_for_owner(client, 
guac_client_owner_send_required_callback, required);

Review comment:
       As it was written, yes, but I think I've since updated that - hopefully 
it's better, now?!




----------------------------------------------------------------
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]


Reply via email to