summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-11-07 15:18:28 -0800
committerKeith Packard <keithp@keithp.com>2013-11-11 15:32:07 -0800
commitfc84166e65c35ad75f566b135dcfc305ad5a2fde (patch)
treed7070f8ac19aaece98245af234b8df76246ea116 /os
parenta239e6faf3fce848ac0d10c48f8e817db68a493c (diff)
Get rid of the rest of the FD passing code when XTRANS_SEND_FDS isn't set
req_fds and SetReqFds in include/dixstruct.h ReadFdFromClient, WriteFdToClient and the FD flushing in os/io.c Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'os')
-rw-r--r--os/io.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/os/io.c b/os/io.c
index a20faa56f..922a8eb02 100644
--- a/os/io.c
+++ b/os/io.c
@@ -259,12 +259,14 @@ ReadRequestFromClient(ClientPtr client)
oc->input = oci;
}
+#if XTRANS_SEND_FDS
/* Discard any unused file descriptors */
while (client->req_fds > 0) {
int req_fd = ReadFdFromClient(client);
if (req_fd >= 0)
close(req_fd);
}
+#endif
/* advance to start of next request */
oci->bufptr += oci->lenLastReq;
@@ -491,6 +493,7 @@ ReadRequestFromClient(ClientPtr client)
return needed;
}
+#if XTRANS_SEND_FDS
int
ReadFdFromClient(ClientPtr client)
{
@@ -513,6 +516,7 @@ WriteFdToClient(ClientPtr client, int fd, Bool do_close)
return _XSERVTransSendFd(oc->trans_conn, fd, do_close);
}
+#endif
/*****************************************************************
* InsertFakeRequest