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