aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/notification
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-04-29 16:12:19 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2017-04-29 16:12:57 +1200
commit6c82282da3b35b2acf46f69655cd0d097058af24 (patch)
treea8c802590896ed7c49e374167a8a7212ef6bb06b /src/org/traccar/notification
parent4f235bcac5b13733684fed8e0ef05968123f6e10 (diff)
downloadtrackermap-server-6c82282da3b35b2acf46f69655cd0d097058af24.tar.gz
trackermap-server-6c82282da3b35b2acf46f69655cd0d097058af24.tar.bz2
trackermap-server-6c82282da3b35b2acf46f69655cd0d097058af24.zip
Save more statistics info
Diffstat (limited to 'src/org/traccar/notification')
-rw-r--r--src/org/traccar/notification/NotificationMail.java1
-rw-r--r--src/org/traccar/notification/NotificationSms.java2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/org/traccar/notification/NotificationMail.java b/src/org/traccar/notification/NotificationMail.java
index c31a02b32..115b109e6 100644
--- a/src/org/traccar/notification/NotificationMail.java
+++ b/src/org/traccar/notification/NotificationMail.java
@@ -115,6 +115,7 @@ public final class NotificationMail {
Transport transport = session.getTransport();
try {
+ Context.getStatisticsManager().registerMail();
transport.connect(
properties.getProperty("mail.smtp.host"),
properties.getProperty("mail.smtp.username"),
diff --git a/src/org/traccar/notification/NotificationSms.java b/src/org/traccar/notification/NotificationSms.java
index 7b265e3ce..8c0265af4 100644
--- a/src/org/traccar/notification/NotificationSms.java
+++ b/src/org/traccar/notification/NotificationSms.java
@@ -34,6 +34,7 @@ public final class NotificationSms {
public static void sendSmsAsync(long userId, Event event, Position position) {
User user = Context.getPermissionsManager().getUser(userId);
if (Context.getSmppManager() != null && user.getPhone() != null) {
+ Context.getStatisticsManager().registerSms();
Context.getSmppManager().sendMessageAsync(user.getPhone(),
NotificationFormatter.formatSmsMessage(userId, event, position), false);
}
@@ -43,6 +44,7 @@ public final class NotificationSms {
UnrecoverablePduException, SmppTimeoutException, SmppChannelException, InterruptedException {
User user = Context.getPermissionsManager().getUser(userId);
if (Context.getSmppManager() != null && user.getPhone() != null) {
+ Context.getStatisticsManager().registerSms();
Context.getSmppManager().sendMessageSync(user.getPhone(),
NotificationFormatter.formatSmsMessage(userId, event, position), false);
}