summaryrefslogtreecommitdiffstats
path: root/stats.c
diff options
context:
space:
mode:
authordscho <dscho>2002-10-29 14:07:15 +0000
committerdscho <dscho>2002-10-29 14:07:15 +0000
commit19c7fc0217e2087af2173974689b9b0f892a18d3 (patch)
tree19d0e028bd9a3ba3bdf55734a7a426a67f16e454 /stats.c
parent347ab48bd94a04b14009f0ac98df5b42d5da11a5 (diff)
downloadlibtdevnc-19c7fc0217e2087af2173974689b9b0f892a18d3.tar.gz
libtdevnc-19c7fc0217e2087af2173974689b9b0f892a18d3.zip
patch from Const for CursorPosUpdate encoding
Diffstat (limited to 'stats.c')
-rw-r--r--stats.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/stats.c b/stats.c
index a941741..7d8b6b6 100644
--- a/stats.c
+++ b/stats.c
@@ -51,8 +51,10 @@ rfbResetStats(rfbClientPtr cl)
}
cl->rfbLastRectMarkersSent = 0;
cl->rfbLastRectBytesSent = 0;
- cl->rfbCursorBytesSent = 0;
- cl->rfbCursorUpdatesSent = 0;
+ cl->rfbCursorShapeBytesSent = 0;
+ cl->rfbCursorShapeUpdatesSent = 0;
+ cl->rfbCursorPosBytesSent = 0;
+ cl->rfbCursorPosUpdatesSent = 0;
cl->rfbFramebufferUpdateMessagesSent = 0;
cl->rfbRawBytesEquivalent = 0;
cl->rfbKeyEventsRcvd = 0;
@@ -77,9 +79,12 @@ rfbPrintStats(rfbClientPtr cl)
totalBytesSent += cl->rfbBytesSent[i];
}
- totalRectanglesSent += (cl->rfbCursorUpdatesSent +
+ totalRectanglesSent += (cl->rfbCursorShapeUpdatesSent +
+ cl->rfbCursorPosUpdatesSent +
cl->rfbLastRectMarkersSent);
- totalBytesSent += (cl->rfbCursorBytesSent + cl->rfbLastRectBytesSent);
+ totalBytesSent += (cl->rfbCursorShapeBytesSent +
+ cl->rfbCursorPosBytesSent +
+ cl->rfbLastRectBytesSent);
rfbLog(" framebuffer updates %d, rectangles %d, bytes %d\n",
cl->rfbFramebufferUpdateMessagesSent, totalRectanglesSent,
@@ -89,9 +94,13 @@ rfbPrintStats(rfbClientPtr cl)
rfbLog(" LastRect and NewFBSize markers %d, bytes %d\n",
cl->rfbLastRectMarkersSent, cl->rfbLastRectBytesSent);
- if (cl->rfbCursorUpdatesSent != 0)
+ if (cl->rfbCursorShapeUpdatesSent != 0)
rfbLog(" cursor shape updates %d, bytes %d\n",
- cl->rfbCursorUpdatesSent, cl->rfbCursorBytesSent);
+ cl->rfbCursorShapeUpdatesSent, cl->rfbCursorShapeBytesSent);
+
+ if (cl->rfbCursorPosUpdatesSent != 0)
+ rfbLog(" cursor position updates %d, bytes %d\n",
+ cl->rfbCursorPosUpdatesSent, cl->rfbCursorPosBytesSent);
for (i = 0; i < MAX_ENCODINGS; i++) {
if (cl->rfbRectanglesSent[i] != 0)
@@ -105,7 +114,8 @@ rfbPrintStats(rfbClientPtr cl)
(double)cl->rfbRawBytesEquivalent
/ (double)(totalBytesSent
- cl->rfbBytesSent[rfbEncodingCopyRect]-
- cl->rfbCursorBytesSent -
+ cl->rfbCursorShapeBytesSent -
+ cl->rfbCursorPosBytesSent -
cl->rfbLastRectBytesSent));
}
}