summaryrefslogtreecommitdiff
path: root/fd.c
diff options
context:
space:
mode:
Diffstat (limited to 'fd.c')
-rw-r--r--fd.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/fd.c b/fd.c
index 4ee9a3e..8ac3e89 100644
--- a/fd.c
+++ b/fd.c
@@ -198,20 +198,31 @@ GetXTransConnInfo(FD fd)
/* ************************************************************ */
-static void
-EOFonFD(FD fd)
+void
+CloseFD(FD fd)
{
- enterprocedure("EOFonFD");
- debug(128, (stderr, "EOF on %d\n", fd));
#ifdef USE_XTRANS
- if (FDD[fd].trans_conn)
- _X11TransClose(FDD[fd].trans_conn);
+ XtransConnInfo conn = GetXTransConnInfo(fd);
+
+ if (conn)
+ _X11TransClose(conn);
else
#endif
close(fd);
+
NotUsingFD(fd);
}
+/* ************************************************************ */
+
+static void
+EOFonFD(FD fd)
+{
+ enterprocedure("EOFonFD");
+ debug(128, (stderr, "EOF on %d\n", fd));
+ CloseFD(fd);
+}
+
FD
AcceptConnection(FD ConnectionSocket)
{