Split ANY PDU evnt into RX and TX for receive and transmit

This commit is contained in:
David Majdandžić
2023-04-06 18:17:43 +02:00
parent 251658f385
commit 363e3f7fc2
9 changed files with 27 additions and 15 deletions

View File

@@ -20,7 +20,7 @@ export default class BindTranscieverReplyProcessor extends Postprocessor {
if (pdu.system_id === entity?.username && pdu.password === entity?.password) {
this.logger.log1(`Center-${entity?.id} client connection successful`);
if (pdu.response) {
session.send(pdu.response());
entity?.doSendPdu(pdu.response(), session);
}
session.resume();
// @ts-ignore
@@ -30,9 +30,9 @@ export default class BindTranscieverReplyProcessor extends Postprocessor {
} else {
this.logger.log1(`Center-${entity?.id} client connection failed, invalid credentials (expected: ${entity?.username}, ${entity?.password})`);
if (pdu.response) {
session.send(pdu.response({
entity?.doSendPdu(pdu.response({
command_status: smpp.ESME_RBINDFAIL
}));
}), session);
}
// @ts-ignore
entity?.pendingSessions = entity?.pendingSessions.filter((s) => s !== session);