summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSolly Ross <sross@redhat.com>2016-01-06 11:18:47 -0500
committerSolly Ross <sross@redhat.com>2016-01-06 11:18:47 -0500
commit464944844f039eea05fa19b0d1747d7ac28c4ac3 (patch)
treece2e922a7793790f20e98db65a0ecfdf4a128638
parent0252c7f7664b5c8848aecd55b14f743122656a92 (diff)
downloadnovnc-refactor/remove-refs-to-jsunzip.tar.gz
Remove unused variables in the TIGHT server initrefactor/remove-refs-to-jsunzip
This commit removes some unused variables in the TIGHT server init section of the server init handler, replacing them with documenting comments and calls to rQskipBytes. Fixes #440.
-rw-r--r--include/rfb.js19
1 files changed, 9 insertions, 10 deletions
diff --git a/include/rfb.js b/include/rfb.js
index 0aa320d..5d98dbd 100644
--- a/include/rfb.js
+++ b/include/rfb.js
@@ -920,18 +920,17 @@ var RFB;
var totalMessagesLength = (numServerMessages + numClientMessages + numEncodings) * 16;
if (this._sock.rQwait('TightVNC extended server init header', totalMessagesLength, 32 + name_length)) { return false; }
- var i;
- for (i = 0; i < numServerMessages; i++) {
- var srvMsg = this._sock.rQshiftStr(16);
- }
+ // we don't actually do anything with the capability information that TIGHT sends,
+ // so we just skip the all of this.
- for (i = 0; i < numClientMessages; i++) {
- var clientMsg = this._sock.rQshiftStr(16);
- }
+ // TIGHT server message capabilities
+ this._sock.rQskipBytes(16 * numServerMessages);
- for (i = 0; i < numEncodings; i++) {
- var encoding = this._sock.rQshiftStr(16);
- }
+ // TIGHT client message capabilities
+ this._sock.rQskipBytes(16 * numClientMessages);
+
+ // TIGHT encoding capabilities
+ this._sock.rQskipBytes(16 * numEncodings);
}
// NB(directxman12): these are down here so that we don't run them multiple times