[ rdesktop-Bugs-2805161 ] Fix client screen depth advertisement

"SourceForge.net" <[email protected]>
Newsgroups gmane.network.rdesktop.devel
Message-ID <[email protected]>
Bugs item #2805161, was opened at 2009-06-12 02:23
Message generated for change (Tracker Item Submitted) made by atmosfear
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=381347&aid=2805161&group_id=24366

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Internals
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Felix Buenemann (atmosfear)
Assigned to: Nobody/Anonymous (nobody)
Summary: Fix client screen depth advertisement

Initial Comment:
The attached patch changes the screen depth request/advertisement sent by the client according to Microsoft protocol documentation MS-RDPBCGR.pdf pg. 32-37. Without the patch connecting to a 24bpp capable server with 32bpp will fallback to 8bpp (because highColorDepth has an invalid value of 32). WIth the patch we correctly set highColorDepth to 24bpp for fallback and signal 32bpp connection via earlyCapabilityFlags.

I am also falling back to 32bpp if 24bpp was requersted and the server only support 32bpp but not 24bpp (which should be the case if it's 32bpp capable). It could be arqued that falling back would mean 16bpp, but I find this behaviour closer to what the user expects.

I also fixed some fields that seemed to be wrongly setup when comparing with the M$ spec. Some stuff seemed wrongly positioned or byteswapped.

There also was an output of out_uint32_le(s, 1) that I removed - was that supposed to be the digital product id? It seemed out of place so I just kept that zeroed out.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=381347&aid=2805161&group_id=24366

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.