[PATCH] dri2: SProcDRI2Connect - send the response.

Michal Srb msrb at suse.com
Fri May 4 09:29:56 PDT 2012


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 <msrb at suse.com>
Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
---
 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


More information about the xorg-devel mailing list