aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/os/xdmcp.c
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2017-03-17 20:39:28 +0100
committerMihai Moldovan <ionic@ionic.de>2017-03-17 20:39:28 +0100
commit7fd5d934c1e73642e9919aa8dd5124466356fb89 (patch)
tree1942909531fe17bb60bd1e4601d7455b19b5c177 /nx-X11/programs/Xserver/os/xdmcp.c
parent6ac805ab4411d3045c99e3ceefe8495ac95d8e15 (diff)
parentf315ae066598d0dc955db081f8d0faf8d358292d (diff)
downloadnx-libs-7fd5d934c1e73642e9919aa8dd5124466356fb89.tar.gz
nx-libs-7fd5d934c1e73642e9919aa8dd5124466356fb89.tar.bz2
nx-libs-7fd5d934c1e73642e9919aa8dd5124466356fb89.zip
Merge branch 'sunweaver-pr/setnotifyfd-ABI' into 3.6.x
Attributes GH PR #331: https://github.com/ArcticaProject/nx-libs/pull/331
Diffstat (limited to 'nx-X11/programs/Xserver/os/xdmcp.c')
-rw-r--r--nx-X11/programs/Xserver/os/xdmcp.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/nx-X11/programs/Xserver/os/xdmcp.c b/nx-X11/programs/Xserver/os/xdmcp.c
index 83e234b43..c4b71f6ec 100644
--- a/nx-X11/programs/Xserver/os/xdmcp.c
+++ b/nx-X11/programs/Xserver/os/xdmcp.c
@@ -88,8 +88,6 @@ static int req_socklen;
static CARD32 SessionID;
static CARD32 timeOutTime;
static int timeOutRtx;
-static CARD32 defaultKeepaliveDormancy = XDM_DEF_DORMANCY;
-static CARD32 keepaliveDormancy = XDM_DEF_DORMANCY;
static CARD16 DisplayNumber;
static xdmcp_states XDM_INIT_STATE = XDM_OFF;
#ifdef HASXDMAUTH
@@ -643,6 +641,7 @@ XdmcpOpenDisplay(int sock)
if (state != XDM_AWAIT_MANAGE_RESPONSE)
return;
state = XDM_RUN_SESSION;
+ timeOutTime = GetTimeInMillis() + XDM_DEF_DORMANCY * 1000;
sessionSocket = sock;
}
@@ -706,7 +705,6 @@ XdmcpWakeupHandler(
void * pReadmask)
{
fd_set* LastSelectMask = (fd_set*)pReadmask;
- fd_set devicesReadable;
#ifdef NX_TRANS_SOCKET
@@ -731,16 +729,6 @@ XdmcpWakeupHandler(
FD_CLR(xdmcpSocket6, LastSelectMask);
}
#endif
- XFD_ANDSET(&devicesReadable, LastSelectMask, &EnabledDevices);
- if (XFD_ANYSET(&devicesReadable))
- {
- if (state == XDM_AWAIT_USER_INPUT)
- restart();
- else if (state == XDM_RUN_SESSION)
- keepaliveDormancy = defaultKeepaliveDormancy;
- }
- if (XFD_ANYSET(&AllClients) && state == XDM_RUN_SESSION)
- timeOutTime = GetTimeInMillis() + keepaliveDormancy * 1000;
}
else if (timeOutTime && (int) (GetTimeInMillis() - timeOutTime) >= 0)
{
@@ -1428,16 +1416,8 @@ recv_alive_msg (unsigned length)
{
if (SessionRunning && AliveSessionID == SessionID)
{
- /* backoff dormancy period */
state = XDM_RUN_SESSION;
- if ((GetTimeInMillis() - lastDeviceEventTime.milliseconds) >
- keepaliveDormancy * 1000)
- {
- keepaliveDormancy <<= 1;
- if (keepaliveDormancy > XDM_MAX_DORMANCY)
- keepaliveDormancy = XDM_MAX_DORMANCY;
- }
- timeOutTime = GetTimeInMillis() + keepaliveDormancy * 1000;
+ timeOutTime = GetTimeInMillis() + XDM_DEF_DORMANCY * 1000;
}
else
{