aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;