Skip to content
This repository has been archived by the owner on Dec 22, 2021. It is now read-only.

Commit

Permalink
Ensure all statements are terminated.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Snare committed Nov 12, 2013
1 parent 0920dbe commit a207b7b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bin/ejabberd-auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// NodeJS script that implements an authentication daemon for eJabberd.
//
'use strict;'
'use strict;';

var assert = require('assert'),
etc = require('etc'),
Expand Down
8 changes: 4 additions & 4 deletions lib/ejabberd.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ EJabberdChannel.prototype.decodeBuffer = function decodeBuffer(buffer) {
while (buffer.length > 2) {
// Check if we have the length prefix.
var commandLength = buffer.readUInt16BE(0),
commandEnd = 2 + commandLength
commandEnd = 2 + commandLength;
if (buffer.length < commandEnd) {
// We don't yet have a complete command.
break;
Expand All @@ -47,14 +47,14 @@ EJabberdChannel.prototype.decodeBuffer = function decodeBuffer(buffer) {
buffer = buffer.slice(commandEnd);
}
return buffer;
}
};
EJabberdChannel.prototype.answer = function answer(success) {
var data = new Buffer(4);
data.writeUInt16BE(2, 0);
data.writeUInt16BE(success ? 1 : 0, 2);
this.out.write(data);
}
};

module.exports = {
EJabberdChannel: EJabberdChannel
}
};

0 comments on commit a207b7b

Please sign in to comment.