aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/smpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/smpp')
-rw-r--r--src/org/traccar/smpp/ClientSmppSessionHandler.java8
-rw-r--r--src/org/traccar/smpp/SmppClient.java2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/org/traccar/smpp/ClientSmppSessionHandler.java b/src/org/traccar/smpp/ClientSmppSessionHandler.java
index 37882c76a..55c6cccc3 100644
--- a/src/org/traccar/smpp/ClientSmppSessionHandler.java
+++ b/src/org/traccar/smpp/ClientSmppSessionHandler.java
@@ -45,7 +45,7 @@ public class ClientSmppSessionHandler extends DefaultSmppSessionHandler {
@Override
public PduResponse firePduRequestReceived(PduRequest request) {
- PduResponse response = null;
+ PduResponse response;
try {
if (request instanceof DeliverSm) {
String sourceAddress = ((DeliverSm) request).getSourceAddress().getAddress();
@@ -53,7 +53,7 @@ public class ClientSmppSessionHandler extends DefaultSmppSessionHandler {
smppClient.mapDataCodingToCharset(((DeliverSm) request).getDataCoding()));
LOGGER.debug("SMS Message Received: " + message.trim() + ", Source Address: " + sourceAddress);
- boolean isDeliveryReceipt = false;
+ boolean isDeliveryReceipt;
if (smppClient.getDetectDlrByOpts()) {
isDeliveryReceipt = request.getOptionalParameters() != null;
} else {
@@ -65,8 +65,8 @@ public class ClientSmppSessionHandler extends DefaultSmppSessionHandler {
}
}
response = request.createResponse();
- } catch (Throwable error) {
- LOGGER.warn(null, error);
+ } catch (Exception error) {
+ LOGGER.warn("SMS receiving error", error);
response = request.createResponse();
response.setResultMessage(error.getMessage());
response.setCommandStatus(SmppConstants.STATUS_UNKNOWNERR);
diff --git a/src/org/traccar/smpp/SmppClient.java b/src/org/traccar/smpp/SmppClient.java
index d7e262c87..c9869cb9c 100644
--- a/src/org/traccar/smpp/SmppClient.java
+++ b/src/org/traccar/smpp/SmppClient.java
@@ -263,7 +263,7 @@ public class SmppClient implements SmsManager {
try {
sendMessageSync(destAddress, message, command);
} catch (MessageException | InterruptedException | IllegalStateException error) {
- LOGGER.warn(null, error);
+ LOGGER.warn("SMS sending error", error);
}
}
});