Hello, We are having a problem with guacamole server - rdp protocol in our company project. We are expected to show detailed and related error message to user. This depends on the error code returning from guacamole server. For example, when incorrect credentials is sent to guacamole server, it is supposed to return an error code indicating that the credentials are incorrect. So, we would be able to show a related error message to user. However guacamole server always returns the same error whose code is GUAC_PROTOCOL_STATUS_UPSTREAM_NOT_FOUND whatever happens.
Actually, we observed that server logs the true error message internally. We are just trying to understand why this true error is not returned as function result. [cid:[email protected]] We traced the source code to find from where final error message is returned. It is the script below. (the script is placed in "static int guac_rdp_handle_connection(guac_client* client)" method in rdp.c file) [cid:[email protected]] As you see, the script tries freerdp_connect method and regardless from what happens inside the method when it fails it returns GUAC_PROTOCOL_STATUS_UPSTREAM_NOT_FOUND code. However, in our case for example, we are expecting the code to be GUAC_PROTOCOL_STATUS_CLIENT_UNAUTHORIZED. Now we are planning to modify this script. We looked up freerdp class methods and noticed the method freerdp_get_last_error. It can be useful to detect the real error code after freerdp_connect results as false. So, according to the error code returning from freerdp_get_last_error we can make the script return the most suitable error code. Finally, we would like to ask you that why the script above returns the same error code whatever happens? Is there a real reason that it is implemented so. We do not want to do something wrong by modifying the script and make it effect some other parts of the server. We thought it would be better if it is asked to you :) Thanks, Caner ALTUNTAŞ
