aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/smpp/SmppClient.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/smpp/SmppClient.java')
-rw-r--r--src/org/traccar/smpp/SmppClient.java9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/org/traccar/smpp/SmppClient.java b/src/org/traccar/smpp/SmppClient.java
index bef2abbf6..7f004645d 100644
--- a/src/org/traccar/smpp/SmppClient.java
+++ b/src/org/traccar/smpp/SmppClient.java
@@ -199,13 +199,8 @@ public class SmppClient {
if (getSession() != null && getSession().isBound()) {
SubmitSm submit = new SubmitSm();
byte[] textBytes;
- if (command) {
- textBytes = CharsetUtil.encode(message, commandsCharsetName);
- submit.setDataCoding(commandsDataCoding);
- } else {
- textBytes = CharsetUtil.encode(message, notificationsCharsetName);
- submit.setDataCoding(notificationsDataCoding);
- }
+ textBytes = CharsetUtil.encode(message, command ? commandsCharsetName : notificationsCharsetName);
+ submit.setDataCoding(command ? commandsDataCoding : notificationsDataCoding);
submit.setShortMessage(textBytes);
submit.setSourceAddress(new Address(sourceTon, sourceNpi, sourceAddress));
submit.setDestAddress(new Address(destTon, destNpi, destAddress));