Lint fixes and dependency updates
This commit is contained in:
+1
-1
@@ -2,8 +2,8 @@ language: node_js
|
||||
node_js:
|
||||
- 4
|
||||
- 6
|
||||
- 7
|
||||
- 8
|
||||
- 10
|
||||
script: "npm run-script cover"
|
||||
after_script: "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"
|
||||
notifications:
|
||||
|
||||
+8
-8
@@ -641,15 +641,15 @@ function session(sock) {
|
||||
while (returnObj.dataQueue.length > 4) {
|
||||
const cmdLength = parseInt(returnObj.dataQueue.readUInt32BE(0)); // Get this commands length
|
||||
|
||||
// Malformed PDU with command length 0
|
||||
if (cmdLength <= 0) {
|
||||
// Since PDU is Malformed we need to discard buffer.
|
||||
log.silly(thisLogPrefix + 'Malformed PDU with 0 Length. Discarding buffer.');
|
||||
returnObj.dataQueue = returnObj.dataQueue.slice(0, returnObj.dataQueue.length);
|
||||
// Malformed PDU with command length 0
|
||||
if (cmdLength <= 0) {
|
||||
// Since PDU is Malformed we need to discard buffer.
|
||||
log.silly(thisLogPrefix + 'Malformed PDU with 0 Length. Discarding buffer.');
|
||||
returnObj.dataQueue = returnObj.dataQueue.slice(0, returnObj.dataQueue.length);
|
||||
|
||||
// Since PDU is malformed we need to close socket since we cannot trust data from now on.
|
||||
returnObj.closeSocket();
|
||||
}
|
||||
// Since PDU is malformed we need to close socket since we cannot trust data from now on.
|
||||
returnObj.closeSocket();
|
||||
}
|
||||
|
||||
let pdu;
|
||||
|
||||
|
||||
Generated
-2789
File diff suppressed because it is too large
Load Diff
+5
-5
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "larvitsmpp",
|
||||
"version": "0.3.3",
|
||||
"version": "0.3.4",
|
||||
"author": {
|
||||
"name": "Mikael 'Lilleman' Göransson",
|
||||
"email": "lilleman@larvit.se",
|
||||
@@ -14,15 +14,15 @@
|
||||
"moment": "^2.18.1",
|
||||
"utils-merge": "^1.0.0",
|
||||
"uuid": "^3.2.1",
|
||||
"winston": "^2.3.1"
|
||||
"winston": "^3.0.0"
|
||||
},
|
||||
"description": "Simplified SMPP implementation",
|
||||
"devDependencies": {
|
||||
"coveralls": "^2.11.9",
|
||||
"coveralls": "^3.0.1",
|
||||
"eslint": "^4.1.0",
|
||||
"istanbul": "^0.4.3",
|
||||
"mocha": "^3.4.2",
|
||||
"mocha-eslint": "^3.0.1",
|
||||
"mocha": "^5.2.0",
|
||||
"mocha-eslint": "^4.1.0",
|
||||
"portfinder": "^1.0.3"
|
||||
},
|
||||
"keywords": [
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
'use strict';
|
||||
|
||||
describe('the end', function () {
|
||||
it('should close down', function (done) {
|
||||
setTimeout(function () {
|
||||
process.exit(0);
|
||||
}, 1000);
|
||||
done();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user