open-src/xserver/xorg/SProcDRI2Connect.patch
author Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
Thu, 24 May 2012 21:07:25 -0700
changeset 1293 16ddf01dc7a2
permissions -rw-r--r--
7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1293
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     1
From 9bc53d8cb04af2be3feeebb1b10774c2d599a76b Mon Sep 17 00:00:00 2001
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     2
From: Michal Srb <[email protected]>
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     3
Date: Tue, 22 May 2012 21:19:40 -0700
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     4
Subject: [PATCH] dri2: SProcDRI2Connect - send the response.
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     5
MIME-Version: 1.0
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     6
Content-Type: text/plain; charset=UTF-8
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     7
Content-Transfer-Encoding: 8bit
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     8
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     9
The swapped implementation of DRI2Connect is always responding with empty
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    10
device and driver values. However the response was only prepared and never
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    11
sent (also had undefined .type member), causing e.g. glxinfo get stuck waiting
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    12
for response when started remotely from machine with different endianity.
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    13
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    14
Signed-off-by: Michal Srb <[email protected]>
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    15
Reviewed-by: Jeremy Huddleston <[email protected]>
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    16
Tested-by: Michel Dänzer <[email protected]>
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    17
Signed-off-by: Keith Packard <[email protected]>
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    18
---
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    19
 hw/xfree86/dri2/dri2ext.c |    3 +++
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    20
 1 file changed, 3 insertions(+)
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    21
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    22
diff --git a/hw/xfree86/dri2/dri2ext.c b/hw/xfree86/dri2/dri2ext.c
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    23
index 2579a5c..61578f3 100644
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    24
--- a/hw/xfree86/dri2/dri2ext.c
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    25
+++ b/hw/xfree86/dri2/dri2ext.c
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    26
@@ -589,12 +589,15 @@ SProcDRI2Connect(ClientPtr client)
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    27
     if (sizeof(*stuff) / 4 != client->req_len)
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    28
         return BadLength;
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    29
 
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    30
+    rep.type = X_Reply;
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    31
     rep.sequenceNumber = client->sequence;
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    32
     swaps(&rep.sequenceNumber);
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    33
     rep.length = 0;
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    34
     rep.driverNameLength = 0;
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    35
     rep.deviceNameLength = 0;
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    36
 
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    37
+    WriteToClient(client, sizeof(xDRI2ConnectReply), &rep);
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    38
+
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    39
     return Success;
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    40
 }
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    41
 
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    42
-- 
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    43
1.7.9.2
16ddf01dc7a2 7170353 applications using DRI2 cannot work via ssh -X to other-endian platform
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    44