The swapped implementation of DRI2Connect is always responding with empty
device and driver values. However the response was only prepared and never
sent (also had undefined .type member), causing e.g. glxinfo get stuck waiting
for response when started remotely from machine with different endianity.

Signed-off-by: Michal Srb <[email protected]>
Reviewed-by: Jeremy Huddleston <[email protected]>
---
 hw/xfree86/dri2/dri2ext.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/xfree86/dri2/dri2ext.c b/hw/xfree86/dri2/dri2ext.c
index 73ef7f2..c7749ba 100644
--- a/hw/xfree86/dri2/dri2ext.c
+++ b/hw/xfree86/dri2/dri2ext.c
@@ -592,12 +592,15 @@ SProcDRI2Connect(ClientPtr client)
     if (sizeof(*stuff) / 4 != client->req_len)
        return BadLength;
 
+    rep.type = X_Reply;
     rep.sequenceNumber = client->sequence;
     swaps(&rep.sequenceNumber);
     rep.length = 0;
     rep.driverNameLength = 0;
     rep.deviceNameLength = 0;
 
+    WriteToClient(client, sizeof(xDRI2ConnectReply), &rep);
+
     return Success;
 }
 
-- 
1.7.9.2
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to