diff options
author | Alexander Volkov <a.volkov@rusbitech.ru> | 2018-02-26 19:41:18 +0300 |
---|---|---|
committer | Olivier Fourdan <ofourdan@redhat.com> | 2018-10-05 09:14:18 +0200 |
commit | b58aa8ed9b0a052d615d34b103aa54ce357df12e (patch) | |
tree | 073dd76f1664163334445e80488bb2d944cfd5eb | |
parent | b1215fb075b0166d5742c72041f58d512273bb50 (diff) |
os/xdmcp: Don't create a new socket in XdmcpReset()
xdmcpSocket survives during the reset, there is no
need to create a new one.
This commit restores logic that was broken by
49c0f2413d32fdfe36e45861fcb32aaeab633094 in Xorg 1.19.
Signed-off-by: Alexander Volkov <a.volkov@rusbitech.ru>
(cherry picked from commit 32677ce03d793a1f2aa8871112eb3d19b3cb762f)
-rw-r--r-- | os/xdmcp.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/os/xdmcp.c b/os/xdmcp.c index d8c81fbf8..62adead84 100644 --- a/os/xdmcp.c +++ b/os/xdmcp.c @@ -569,10 +569,9 @@ XdmcpRegisterDisplayClass(const char *name, int length) } static void -xdmcp_start(void) +xdmcp_reset(void) { timeOutRtx = 0; - get_xdmcp_sock(); if (xdmcpSocket >= 0) SetNotifyFd(xdmcpSocket, XdmcpSocketNotify, X_NOTIFY_READ, NULL); #if defined(IPv6) && defined(AF_INET6) @@ -583,6 +582,13 @@ xdmcp_start(void) send_packet(); } +static void +xdmcp_start(void) +{ + get_xdmcp_sock(); + xdmcp_reset(); +} + /* * initialize XDMCP; create the socket, compute the display * number, set up the state machine @@ -611,7 +617,7 @@ XdmcpReset(void) { state = XDM_INIT_STATE; if (state != XDM_OFF) - xdmcp_start(); + xdmcp_reset(); } /* |