aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/TrackerEventHandler.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/TrackerEventHandler.java')
-rw-r--r--src/org/traccar/TrackerEventHandler.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/TrackerEventHandler.java b/src/org/traccar/TrackerEventHandler.java
index e6428ee36..8378dece3 100644
--- a/src/org/traccar/TrackerEventHandler.java
+++ b/src/org/traccar/TrackerEventHandler.java
@@ -39,9 +39,9 @@ public class TrackerEventHandler extends SimpleChannelHandler {
public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) {
if (e.getMessage() instanceof Position) {
-
+
Position position = (Position) e.getMessage();
-
+
if (position == null) {
System.out.println("null message");
} else {
@@ -59,7 +59,7 @@ public class TrackerEventHandler extends SimpleChannelHandler {
// Write position to database
try {
- dataManager.setPosition(position);
+ dataManager.addPosition(position);
} catch (Exception error) {
System.out.println(error.getMessage());
}