From 268b0554261ed3f6efb92b7541fc3185d6e53e45 Mon Sep 17 00:00:00 2001 From: daper Date: Sat, 1 Nov 2014 17:38:33 +0100 Subject: [PATCH] Reset sequence session counter. --- lib/smpp.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/smpp.js b/lib/smpp.js index 60b9abc..2ad0d45 100644 --- a/lib/smpp.js +++ b/lib/smpp.js @@ -64,6 +64,9 @@ Session.prototype.send = function(pdu, callback) { // traffic, the sequence_number will be provided by // client otherwise we generate it automatically if (!pdu.sequence_number) { + if (this.sequence == 0x7FFFFFFF) { + this.sequence = 0; + } pdu.sequence_number = ++this.sequence; }