summaryrefslogtreecommitdiff
path: root/service/SoftwareUpdater.cpp
diff options
context:
space:
mode:
authorGrant Limberg <grant.limberg@zerotier.com>2017-10-02 15:52:57 -0700
committerGrant Limberg <grant.limberg@zerotier.com>2017-10-02 15:52:57 -0700
commitb1d60df44cb24589bc5718da932ef4bb54168fa3 (patch)
treec240b5b626f534f4a3673bedbdf6d80b59a8d475 /service/SoftwareUpdater.cpp
parent7cf70d111ac3bfc1bf6aa7e3ec8d9c83e35f48a1 (diff)
downloadinfinitytier-b1d60df44cb24589bc5718da932ef4bb54168fa3.tar.gz
infinitytier-b1d60df44cb24589bc5718da932ef4bb54168fa3.zip
timestamps changed from uint64_t to int64_t
There were cases in the code where time calculations and comparisons were overflowing and causing connection instability. This will keep time calculations within expected ranges.
Diffstat (limited to 'service/SoftwareUpdater.cpp')
-rw-r--r--service/SoftwareUpdater.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/service/SoftwareUpdater.cpp b/service/SoftwareUpdater.cpp
index 11005945..39833c90 100644
--- a/service/SoftwareUpdater.cpp
+++ b/service/SoftwareUpdater.cpp
@@ -303,7 +303,7 @@ void SoftwareUpdater::handleSoftwareUpdateUserMessage(uint64_t origin,const void
}
}
-bool SoftwareUpdater::check(const uint64_t now)
+bool SoftwareUpdater::check(const int64_t now)
{
if ((now - _lastCheckTime) >= ZT_SOFTWARE_UPDATE_CHECK_PERIOD) {
_lastCheckTime = now;