Skip to content
Snippets Groups Projects
Commit 92151643 authored by deuce's avatar deuce
Browse files

Make it syncjslint clean.

parent 350c8bc5
No related branches found
No related tags found
No related merge requests found
......@@ -647,6 +647,12 @@ BinkP.prototype.recvFrame = function(timeout)
var ver;
var avail;
// Avoid warning from syncjslint by putting this in a closure.
function hex2ascii(hex)
{
return ascii(parseInt(hex, 16));
}
if (this.sock === undefined) {
this.partialFrame = undefined;
return undefined;
......@@ -738,9 +744,7 @@ BinkP.prototype.recvFrame = function(timeout)
case 'OPT':
for (i=1; i<args.length; i++) {
if (args[i].substr(0,9) === 'CRAM-MD5-') {
this.cram = {algo:'MD5', challenge:args[i].substr(9).replace(/[0-9a-fA-F]{2}/g,
function(m){return ascii(parseInt(m, 16));})
};
this.cram = {algo:'MD5', challenge:args[i].substr(9).replace(/[0-9a-fA-F]{2}/g, hex2ascii)};
}
else {
if (args[i] === 'NR') {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment