Xi: fix querydevice request swapping

WriteReplyToClient() swaps rep.length, so it can't be used
on return of WriteReplyToClient(). So save it's value for later
use.

Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Reviewed-by: Julien Cristau <jcristau@debian.org>
This commit is contained in:
Matthieu Herrb 2011-04-01 22:55:57 +02:00
parent 552c78592c
commit 266ea63bc3

View File

@ -153,8 +153,9 @@ ProcXIQueryDevice(ClientPtr client)
}
}
len = rep.length * 4;
WriteReplyToClient(client, sizeof(xXIQueryDeviceReply), &rep);
WriteToClient(client, rep.length * 4, ptr);
WriteToClient(client, len, ptr);
free(ptr);
free(skip);
return rc;