Currently there is a list of 25 disconnect codes handled, but a list found , shows there are at least 10 more to be handled.
We should at least, handle and log as text instead of a number as we do with the other codes.
Official documentation for the codes from the RDP server:
Pull request made upstream:
Fixed by vendordrop. I have tested using Windows Server 2016. Some other Windows server versions need to be verified as well.
Testing should verify the following on both 2008 R2 and 2012 R2:
* Informative and correct log messages for the most common disconnect reasons
* Code looks good for disconnect reason cases not triggered manually
Also verify the following using any Windows server platform:
* File names including for example Russian or Swedish characters work as intended using local drive redirection
(Smart card changes will be tested on bug 7057.)
Seeing as the ThinLinc wrapper scripts have a separate way of displaying some disconnect reasons (see bug 7033 for example) the testing of this bug involves looking at the logfile. The messages should appear in xinit.log if rdesktop is started as a profile.
Verified valid messages for codes possible to initiate (ERRINFO_RPC_INITIATED_LOGOFF, ERRINFO_RPC_INITIATED_DISCONNECT, ERRINFO_LOGOFF_BYUSER, ERRINFO_RPC_INITIATED_DISCONNECT_BYUSER) on demo system (2008 R2) and tl01 (2012 R2).
Inspected code change, found no inconsistencies. Looks good.
*** Bug 4809 has been marked as a duplicate of this bug. ***