diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2020-12-31 00:03:44 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-01-15 16:38:11 +0100 |
commit | 6c09c0b7ecadd1f512a9f795d8f34961b1cc9baf (patch) | |
tree | 9d2c0b67ca993f1d752cd7a4e4cc6ab37ec44f2f | |
parent | 1b91c8ac18bd43d592cb63ac995c7695d3da192e (diff) | |
download | nx-libs-6c09c0b7ecadd1f512a9f795d8f34961b1cc9baf.tar.gz nx-libs-6c09c0b7ecadd1f512a9f795d8f34961b1cc9baf.tar.bz2 nx-libs-6c09c0b7ecadd1f512a9f795d8f34961b1cc9baf.zip |
nxagent: make XDMCP variables Booleans
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Handlers.c | 14 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 4 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Xdmcp.h | 2 |
3 files changed, 10 insertions, 10 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c index 01c1e0638..a3624dbfc 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c @@ -114,8 +114,8 @@ extern void nxagentDumpInputDevicesState(void); * Used in the handling of the X desktop manager protocol. */ -int nxagentXdmcpUp = 0; -int nxagentXdmcpAlertUp = 0; +Bool nxagentXdmcpUp = False; +Bool nxagentXdmcpAlertUp = False; /* * Also used in the block, wakeup and sync handlers. @@ -648,7 +648,7 @@ void nxagentWakeupHandler(void * data, int count, void * mask) * the session. */ - if (nxagentOption(Xdmcp) && nxagentXdmcpUp == 0) + if (nxagentOption(Xdmcp) && !nxagentXdmcpUp) { #ifdef DEBUG fprintf(stderr, "nxagentWakeupHandler: XdmcpState [%d].\n", XdmcpState); @@ -656,10 +656,10 @@ void nxagentWakeupHandler(void * data, int count, void * mask) if (XdmcpState == XDM_RUN_SESSION) { - nxagentXdmcpUp = 1; + nxagentXdmcpUp = True; } - if (nxagentXdmcpUp == 0) + if (!nxagentXdmcpUp) { #ifdef DEBUG fprintf(stderr, "nxagentWakeupHandler: XdmcpTime [%lu].\n", @@ -671,7 +671,7 @@ void nxagentWakeupHandler(void * data, int count, void * mask) XdmcpTimeOutRtx); #endif - if (nxagentXdmcpAlertUp == 0 && + if (!nxagentXdmcpAlertUp && GetTimeInMillis() - XdmcpStartTime >= XDM_TIMEOUT) { #ifdef WARNING @@ -681,7 +681,7 @@ void nxagentWakeupHandler(void * data, int count, void * mask) NXTransAlert(FAILED_XDMCP_CONNECTION_ALERT, NX_ALERT_REMOTE); - nxagentXdmcpAlertUp = 1; + nxagentXdmcpAlertUp = True; } } } diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index 6573ac0b9..12a44dbe0 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -330,7 +330,7 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio clientReady[0] = 0; - if (nxagentHaveSplashWindow() || (nxagentOption(Xdmcp) && nxagentXdmcpUp == 0)) + if (nxagentHaveSplashWindow() || (nxagentOption(Xdmcp) && !nxagentXdmcpUp)) { #ifdef TEST fprintf(stderr, "******Dispatch: Requesting a timeout of [%d] Ms.\n", @@ -343,7 +343,7 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio if (serverGeneration > nxagentMaxAllowedResets && nxagentSessionState == SESSION_STARTING && - (!nxagentOption(Xdmcp) || nxagentXdmcpUp == 1)) + (!nxagentOption(Xdmcp) || nxagentXdmcpUp)) { #ifdef NX_DEBUG_INPUT fprintf(stderr, "Session: Session started at '%s' timestamp [%u].\n", diff --git a/nx-X11/programs/Xserver/hw/nxagent/Xdmcp.h b/nx-X11/programs/Xserver/hw/nxagent/Xdmcp.h index 086ea9082..946b856bc 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Xdmcp.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Xdmcp.h @@ -36,6 +36,6 @@ extern xdmcp_states XdmcpState; extern int XdmcpTimeOutRtx; extern int XdmcpStartTime; -extern int nxagentXdmcpUp; +extern Bool nxagentXdmcpUp; #endif /* __Xdmcp_H__ */ |