Remove unused variables in the TIGHT server init

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.
This commit is contained in:
Solly Ross 2016-01-06 11:18:47 -05:00
parent 0252c7f766
commit 464944844f
1 changed files with 9 additions and 10 deletions

View File

@ -920,18 +920,17 @@ var RFB;
var totalMessagesLength = (numServerMessages + numClientMessages + numEncodings) * 16; var totalMessagesLength = (numServerMessages + numClientMessages + numEncodings) * 16;
if (this._sock.rQwait('TightVNC extended server init header', totalMessagesLength, 32 + name_length)) { return false; } if (this._sock.rQwait('TightVNC extended server init header', totalMessagesLength, 32 + name_length)) { return false; }
var i; // we don't actually do anything with the capability information that TIGHT sends,
for (i = 0; i < numServerMessages; i++) { // so we just skip the all of this.
var srvMsg = this._sock.rQshiftStr(16);
}
for (i = 0; i < numClientMessages; i++) { // TIGHT server message capabilities
var clientMsg = this._sock.rQshiftStr(16); this._sock.rQskipBytes(16 * numServerMessages);
}
for (i = 0; i < numEncodings; i++) { // TIGHT client message capabilities
var encoding = this._sock.rQshiftStr(16); 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 // NB(directxman12): these are down here so that we don't run them multiple times