diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2012-04-27 19:18:28 +0000 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2012-04-27 19:18:28 +0000 |
commit | 89654e64cfa18e19741ea97fe685ccfa2f40788c (patch) | |
tree | 5783e91ece939b047a87977617339d154bd0517b /src/org/traccar/TrackerEventHandler.java | |
parent | e9527c7a8a99e09f47e2169676dee85a7834d670 (diff) | |
download | trackermap-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.java | 6 |
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()); } |