Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,11 @@ public void sessionBindRequested(
) throws SmppProcessingException {
logger.info("new bind request from ip:{} systemId:{}", sessionConfiguration.getHost(), sessionConfiguration.getSystemId());
checkIfConnectionFromIpIsOverLimit(sessionConfiguration.getHost());
SmppSessionContext context = authProvider.authenticate(
var context = authProvider.authenticate(
sessionConfiguration.getSystemId(),
sessionConfiguration.getPassword(),
sessionConfiguration.getHost()
);
pendingSessionContexts.put(sessionId, context);
String accountId = context.getAccountId();

checkIfConnectionsFromAccountIdIsOverLimit(accountId, context.getMaxConnections());
Expand All @@ -63,6 +62,7 @@ public void sessionBindRequested(
String packageName = SmppServerBindHandler.class.getPackageName();
sessionConfiguration.getLoggingOptions().setLoggerName(packageName);
sessionConfiguration.getLoggingOptions().setLogParamPrefix("accId:" + accountId);
pendingSessionContexts.put(sessionId, context);
}

public void sessionCreated(
Expand All @@ -73,7 +73,7 @@ public void sessionCreated(
String accountId = session.getConfiguration().getName();
Tlv optional = new Tlv(SmppConstants.TAG_SC_INTERFACE_VERSION, new byte[]{SmppConstants.VERSION_3_4}, "Interface Version");
preparedBindResponse.setOptionalParameter(optional);
SmppSessionContext smppSessionContext = pendingSessionContexts.remove(sessionId);
var smppSessionContext = pendingSessionContexts.remove(sessionId);
var handler = new SmppServerSessionHandler<M>(worker, sessionId, session, smppSessionContext, submitSmProcessor);
if (smppSessionContext != null && !Strings.isNullOrEmpty(smppSessionContext.getProduct())) {
handler.setApiProduct(smppSessionContext.getProduct());
Expand Down Expand Up @@ -129,6 +129,7 @@ public void sessionDestroyed(Long sessionId, SmppServerSession session) {
logger.info("final session rx-submitSM: name:{}-{}", session.getConfiguration().getName(), session.getCounters().getRxSubmitSM());
}
connections.removeConnection(session);
pendingSessionContexts.remove(sessionId);
session.destroy();
}

Expand Down
Loading