aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2020-02-18 22:35:19 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-05-07 14:57:21 +0200
commit0d9d21287cd3a7db7695efdb4ff85c53234536f2 (patch)
treeb5d266796673c7e9e653f833e9276eb97b34badc /nx-X11/programs
parent7921cf79fe2fc1c193bf0726bbc4818a94da3e20 (diff)
downloadnx-libs-0d9d21287cd3a7db7695efdb4ff85c53234536f2.tar.gz
nx-libs-0d9d21287cd3a7db7695efdb4ff85c53234536f2.tar.bz2
nx-libs-0d9d21287cd3a7db7695efdb4ff85c53234536f2.zip
Client.c: mask unused clientBytes stuff
The only place where this was referenced outside Client.c was a commented section in Handlers.c. For now lets mask all that by an (unset) define.
Diffstat (limited to 'nx-X11/programs')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Client.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Client.h4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Handlers.c2
3 files changed, 10 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Client.c b/nx-X11/programs/Xserver/hw/nxagent/Client.c
index 0b8331b79..33841f436 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Client.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Client.c
@@ -111,7 +111,9 @@ void nxagentInitClientPrivates(ClientPtr client)
if (nxagentClientPriv(client))
{
nxagentClientPriv(client) -> clientState = 0;
+#ifdef COUNT_CLIENT_BYTES
nxagentClientPriv(client) -> clientBytes = 0;
+#endif
nxagentClientPriv(client) -> clientHint = UNKNOWN;
}
}
@@ -284,6 +286,7 @@ void nxagentWakeupByReset(ClientPtr client)
}
}
+#ifdef COUNT_CLIENT_BYTES
if (client -> index < MAX_CONNECTIONS)
{
#ifdef TEST
@@ -293,6 +296,7 @@ void nxagentWakeupByReset(ClientPtr client)
nxagentClientBytes(client) = 0;
}
+#endif
}
/*
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Client.h b/nx-X11/programs/Xserver/hw/nxagent/Client.h
index 8f4f503ba..094e45257 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Client.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Client.h
@@ -59,11 +59,15 @@ extern int nxagentClientPrivateIndex;
void nxagentInitClientPrivates(ClientPtr);
+#undef COUNT_CLIENT_BYTES
+
+#ifdef COUNT_CLIENT_BYTES
#define nxagentClientAddBytes(pClient, size) \
(nxagentClientPriv(pClient) -> clientBytes += (size))
#define nxagentClientBytes(pClient) \
(nxagentClientPriv(pClient) -> clientBytes)
+#endif
#define nxagentClientHint(pClient) \
(nxagentClientPriv(pClient) -> clientHint)
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c
index dffdcaf14..411dfe933 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c
@@ -1041,6 +1041,7 @@ void nxagentDispatchHandler(ClientPtr client, int in, int out)
in, client -> index);
#endif
+#ifdef COUNT_CLIENT_BYTES
/*
* This is presently unused.
*
@@ -1052,6 +1053,7 @@ void nxagentDispatchHandler(ClientPtr client, int in, int out)
* #endif
*
*/
+#endif
nxagentBytesIn += in;