Commit 32677ce0 authored by Alexander Volkov's avatar Alexander Volkov Committed by Adam Jackson
Browse files

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
49c0f241

 in Xorg 1.19.

Signed-off-by: Alexander Volkov's avatarAlexander Volkov <a.volkov@rusbitech.ru>
parent 1bd5d0a5
Pipeline #5251 passed with stage
in 2 minutes and 24 seconds
......@@ -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();
}
/*
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment