Bug 88614

Summary: RRGetOutputInfo num-preferred field in reply is not swapped
Product: xorg Reporter: Carlos Sánchez de La Lama <csanchezdll>
Component: Server/Ext/RandRAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: 7.6 (2010.12)   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Prints returned num-preferred field in a RRGetOutputInfo reply
none
Proposed patch none

Description Carlos Sánchez de La Lama 2015-01-20 08:29:40 UTC
Created attachment 112520 [details]
Prints returned num-preferred field in a RRGetOutputInfo reply

When client and server have different byte sex (client->swapped == 1), server swaps fields in the RRGetOutputInfo reply, but num-preferred field is not swapped.

In my 1.9.3 server on x86_64, running the attached program (bug_numpreferred.c) locally prints "1", but running it from my PowerPC laptop using the x86_64 as X server prints "256".
Comment 1 Carlos Sánchez de La Lama 2015-01-20 08:47:36 UTC
Created attachment 112523 [details]
Proposed patch
Comment 2 Chris Wilson 2015-02-06 10:45:08 UTC
commit 437d2ec5f250f8ab4b44cbae56f938719802e1cc
Author: Carlos Sánchez de La Lama <csanchezdll@gmail.com>
Date:   Wed Jan 21 10:22:05 2015 +0100

    randr: swap num-preferred field on RRGetOutputInfo reply

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.