summaryrefslogtreecommitdiff
path: root/Xi
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu.herrb@laas.fr>2011-04-01 22:55:57 +0200
committerMatthieu Herrb <matthieu.herrb@laas.fr>2011-04-02 09:14:53 +0200
commit266ea63bc3e052b753c5484fa08dcc4fb67c8952 (patch)
tree1fb46bea27ab13daea581ad9e66802c568a312de /Xi
parent552c78592c5e5f52fe16e2429f77c63adf398247 (diff)
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>
Diffstat (limited to 'Xi')
-rw-r--r--Xi/xiquerydevice.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Xi/xiquerydevice.c b/Xi/xiquerydevice.c
index 8b5421130..6eea72410 100644
--- a/Xi/xiquerydevice.c
+++ b/Xi/xiquerydevice.c
@@ -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;