necouchman 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_r272806236
 
 

 ##########
 File path: src/libguac/guacamole/user.h
 ##########
 @@ -537,32 +544,6 @@ void guac_user_free(guac_user* user);
  */
 int guac_user_handle_connection(guac_user* user, int usec_timeout);
 
-/**
- * Call the appropriate handler defined by the given user for the given
- * instruction. A comparison is made between the instruction opcode and the
- * initial handler lookup table defined in user-handlers.c. The intial handlers
- * will in turn call the user's handler (if defined).
- *
- * @param user
- *     The user whose handlers should be called.
- *
- * @param opcode
- *     The opcode of the instruction to pass to the user via the appropriate
- *     handler.
- *
- * @param argc
- *     The number of arguments which are part of the instruction.
- *
- * @param argv
- *     An array of all arguments which are part of the instruction.
- *
- * @return
- *     Non-negative if the instruction was handled successfully, or negative
- *     if an error occurred.
- */
-int guac_user_handle_instruction(guac_user* user, const char* opcode,
 
 Review comment:
   If I don't move this, and leave it the way I have it implemented (passing a 
`__guac_instruction_handler_mapping` pointer in as the array for it to search 
through), then I have to include `user-handlers.h` in `user.h` in order for it 
to have that pointer type defined.  This seemed like something worth avoiding, 
both because `user-handlers.h` is outside the public API for libguac, and 
because `user-handlers.c` already includes `user.h`, making it almost a 
circular set of includes.
   
   Should I just copy it instead of move it, and mark this for deprecation?  Or 
is there some other route I should go with where each of these items should be 
to avoid this conundrum?  Mainly I was trying to re-use the code in 
`guac_user_handle_instruction`, and it seems like the best way to do that is to 
allow the caller to specify which array of opcode/handler pairs should be 
referenced.

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

Reply via email to