aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/smpp/ClientSmppSessionHandler.java
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2018-03-06 13:52:44 +0500
committerAbyss777 <abyss@fox5.ru>2018-03-06 14:01:12 +0500
commit5ac0f773023a9c1c70524f1b63d2afc7d837a31f (patch)
tree23e8c877e8dd0823e24823c9ca07cb3b3fa92ed9 /src/org/traccar/smpp/ClientSmppSessionHandler.java
parent88456dc2e2b3cc5a618b2a041c43230ed550f12f (diff)
downloadtrackermap-server-5ac0f773023a9c1c70524f1b63d2afc7d837a31f.tar.gz
trackermap-server-5ac0f773023a9c1c70524f1b63d2afc7d837a31f.tar.bz2
trackermap-server-5ac0f773023a9c1c70524f1b63d2afc7d837a31f.zip
Implement additional way to detect SMPP delivery receipts
Diffstat (limited to 'src/org/traccar/smpp/ClientSmppSessionHandler.java')
-rw-r--r--src/org/traccar/smpp/ClientSmppSessionHandler.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/org/traccar/smpp/ClientSmppSessionHandler.java b/src/org/traccar/smpp/ClientSmppSessionHandler.java
index 69ef9af41..3585f8376 100644
--- a/src/org/traccar/smpp/ClientSmppSessionHandler.java
+++ b/src/org/traccar/smpp/ClientSmppSessionHandler.java
@@ -50,7 +50,14 @@ public class ClientSmppSessionHandler extends DefaultSmppSessionHandler {
smppClient.mapDataCodingToCharset(((DeliverSm) request).getDataCoding()));
Log.debug("SMS Message Received: " + message.trim() + ", Source Address: " + sourceAddress);
- if (!SmppUtil.isMessageTypeAnyDeliveryReceipt(((DeliverSm) request).getEsmClass())) {
+ boolean isDeliveryReceipt = false;
+ if (smppClient.getDetectDlrByOpts()) {
+ isDeliveryReceipt = request.getOptionalParameters() != null;
+ } else {
+ isDeliveryReceipt = SmppUtil.isMessageTypeAnyDeliveryReceipt(((DeliverSm) request).getEsmClass());
+ }
+
+ if (!isDeliveryReceipt) {
TextMessageEventHandler.handleTextMessage(sourceAddress, message);
}
}