aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/TrackerEventHandler.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2012-04-27 19:18:28 +0000
committerAnton Tananaev <anton.tananaev@gmail.com>2012-04-27 19:18:28 +0000
commit89654e64cfa18e19741ea97fe685ccfa2f40788c (patch)
tree5783e91ece939b047a87977617339d154bd0517b /src/org/traccar/TrackerEventHandler.java
parente9527c7a8a99e09f47e2169676dee85a7834d670 (diff)
downloadtrackermap-server-89654e64cfa18e19741ea97fe685ccfa2f40788c.tar.gz
trackermap-server-89654e64cfa18e19741ea97fe685ccfa2f40788c.tar.bz2
trackermap-server-89654e64cfa18e19741ea97fe685ccfa2f40788c.zip
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());
}