Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2011-07-06 12:57:13 -0400
committereutarass2011-07-06 12:57:13 -0400
commit216f3ab4f705abbb6080695cf7907b9b73b67f75 (patch)
treebbb920639ecd76b2b571759ee95a2b242a358faf
parenta6c2942428996402853b56cbb01a9f3d857492a4 (diff)
downloadorg.eclipse.tcf-216f3ab4f705abbb6080695cf7907b9b73b67f75.tar.gz
org.eclipse.tcf-216f3ab4f705abbb6080695cf7907b9b73b67f75.tar.xz
org.eclipse.tcf-216f3ab4f705abbb6080695cf7907b9b73b67f75.zip
Bug 351305 - "Invalid Datagram Packet Received" error logged when system clock not accurate.
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/LocatorService.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/LocatorService.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/LocatorService.java
index 0a2cb24b3..1b6b08549 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/LocatorService.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/local/LocatorService.java
@@ -904,7 +904,7 @@ public class LocatorService implements ILocator {
if (!subnet.contains(x.address)) continue;
}
subnet.send_all_ok = true;
- String s = x.last_packet_time + ":" + x.port + ":" + x.address.getHostAddress();
+ String s = ttl + ":" + x.port + ":" + x.address.getHostAddress();
byte[] bt = getUTF8Bytes(s);
if (i > 8 && i + bt.length >= PREF_PACKET_SIZE) {
sendDatagramPacket(subnet, i, addr, port);
@@ -1056,7 +1056,7 @@ public class LocatorService implements ILocator {
long time_val = timestamp.length() > 0 ? Long.parseLong(timestamp) : time_now;
if (time_val < 3600000) {
/* Time stamp is "time to live" in milliseconds */
- time_val = time_now + time_val / 1000 - DATA_RETENTION_PERIOD;
+ time_val = time_now + time_val - DATA_RETENTION_PERIOD;
}
else if (time_val < time_now / 1000 + 50000000) {
/* Time stamp is in seconds */

Back to the top