aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/smpp
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-03-16 09:49:34 +0500
committerAbyss777 <abyss@fox5.ru>2017-03-20 10:49:21 +0500
commit99e16edfd8b29d5ef1b751eefcf87a14df35cb9b (patch)
tree3427204a869a9ba568df7e71c5358104dc52ec09 /src/org/traccar/smpp
parent32cf37a4784418bc9be8d66add1b51af3aa91a4d (diff)
downloadtrackermap-server-99e16edfd8b29d5ef1b751eefcf87a14df35cb9b.tar.gz
trackermap-server-99e16edfd8b29d5ef1b751eefcf87a14df35cb9b.tar.bz2
trackermap-server-99e16edfd8b29d5ef1b751eefcf87a14df35cb9b.zip
Implement phone to device comparison
Diffstat (limited to 'src/org/traccar/smpp')
-rw-r--r--src/org/traccar/smpp/ClientSmppSessionHandler.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/org/traccar/smpp/ClientSmppSessionHandler.java b/src/org/traccar/smpp/ClientSmppSessionHandler.java
index 2a538a40f..f4d40c3eb 100644
--- a/src/org/traccar/smpp/ClientSmppSessionHandler.java
+++ b/src/org/traccar/smpp/ClientSmppSessionHandler.java
@@ -16,6 +16,7 @@
*/
package org.traccar.smpp;
+import org.traccar.Context;
import org.traccar.helper.Log;
import com.cloudhopper.commons.charset.CharsetUtil;
@@ -49,11 +50,11 @@ public class ClientSmppSessionHandler extends DefaultSmppSessionHandler {
+ ", State: "
+ request.getOptionalParameter(SmppConstants.TAG_MSG_STATE).getValueAsByte());
} else {
- Log.debug("SMS Message Received: "
- + CharsetUtil.decode(((DeliverSm) request).getShortMessage(),
- smppClient.mapDataCodingToCharset(((DeliverSm) request).getDataCoding())).trim()
- + ", Source Address: "
- + ((DeliverSm) request).getSourceAddress().getAddress());
+ String sourceAddress = ((DeliverSm) request).getSourceAddress().getAddress();
+ String message = CharsetUtil.decode(((DeliverSm) request).getShortMessage(),
+ smppClient.mapDataCodingToCharset(((DeliverSm) request).getDataCoding()));
+ Log.debug("SMS Message Received: " + message.trim() + ", Source Address: " + sourceAddress);
+ Context.getDeviceManager().handleTextMessage(sourceAddress, message);
}
}
response = request.createResponse();