On Thu, Feb 6, 2020 at 11:34 AM Caner ALTUNTAŞ <[email protected]> wrote:
> ... > > 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. > Please feel free to open a JIRA issue and contribute these changes via a PR when you are ready. I'm not familiar with the full extent of the errors visible via freerdp_get_last_error(), and you will need to be careful to map only those errors which make sense to map (not everything should be exposed to the user), but it should be possible to improve things such that an appropriate error is forwarded to the user and an appropriate message is logged on the Guacamole side. An RDP disconnect due to invalid credentials, etc. is intended to map to a proper Guacamole error code, though that handling currently only involves the RDP "disconnect reason" code: https://github.com/apache/guacamole-server/blob/68a628581866c4d3797cea33d53fa91555cc4383/src/protocols/rdp/error.c 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 :) > Only because the function freerdp_get_last_error() did not exist in the versions of FreeRDP that were around at the time the RDP support was written. - Mike
