[ 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-11 20:23
Message generated for change (Comment added) made by floppym
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.

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

Comment By: Michael Gilbert (floppym)
Date: 2009-11-29 12:56

Message:
Patch is working as advertised -- I have been using it since September. 
Tested with Windows 7 (32 bpp) and 2003 (24 bpp) remotes.

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

Comment By: Felix Buenemann (atmosfear)
Date: 2009-07-28 05:59

Message:
Added correct patch file, thx jsorg71.

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

Comment By: Jay Sorg (jsorg71)
Date: 2009-07-27 01:09

Message:
Do you have the right file here.
I don't see any diff between this and what is in rdesktop.org but I still
see the problem.


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

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

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
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.