Skip to content

Commit

Permalink
Fix issue with web data handler
Browse files Browse the repository at this point in the history
  • Loading branch information
tananaev committed Jul 21, 2015
1 parent ec01f2e commit a92dc85
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
13 changes: 6 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,12 @@
<dependency>
<groupId>com.ning</groupId>
<artifactId>async-http-client</artifactId>
<version>1.9.29</version>
<exclusions>
<exclusion>
<artifactId>slf4j-api</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
</exclusions>
<version>1.9.30</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.12</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
Expand Down
12 changes: 6 additions & 6 deletions src/org/traccar/WebDataHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ protected Position handlePosition(Position position) {
Device device = Context.getIdentityManager().getDeviceById(position.getDeviceId());

String request = url.
replaceAll("\\{uniqueId}", device.getUniqueId()).
replaceAll("\\{deviceId}", String.valueOf(device.getId())).
replaceAll("\\{fixTime}", String.valueOf(position.getFixTime().getTime())).
replaceAll("\\{latitude}", String.valueOf(position.getLatitude())).
replaceAll("\\{longitude}", String.valueOf(position.getLongitude())).
replaceAll("\\{gprmc}", formatSentence(position));
replace("{uniqueId}", device.getUniqueId()).
replace("{deviceId}", String.valueOf(device.getId())).
replace("{fixTime}", String.valueOf(position.getFixTime().getTime())).
replace("{latitude}", String.valueOf(position.getLatitude())).
replace("{longitude}", String.valueOf(position.getLongitude())).
replace("{gprmc}", formatSentence(position));

AsyncHttpClient asyncHttpClient = new AsyncHttpClient();
asyncHttpClient.prepareGet(request).execute();
Expand Down

0 comments on commit a92dc85

Please sign in to comment.