Bump version to 0.6.4 for testing, integrate software updater auto-check into PacketDecoder decode path and main loop.

This commit is contained in:
Adam Ierymenko 2013-12-26 20:57:17 -08:00
parent 54c2c945e0
commit c8166b2db1
5 changed files with 31 additions and 1 deletions

View file

@ -76,6 +76,9 @@ public:
/**
* Check for updates now regardless of last check time or version
*
* This only starts a check if one is not in progress. Otherwise it does
* nothing.
*/
inline void checkNow()
{
@ -87,6 +90,17 @@ public:
}
}
/**
* Check for updates now if it's been longer than ZT_UPDATE_MAX_INTERVAL
*
* This is called periodically from the main loop.
*/
inline void checkIfMaxIntervalExceeded(uint64_t now)
{
if ((now - _lastUpdateAttempt) >= ZT_UPDATE_MAX_INTERVAL)
checkNow();
}
/**
* Pack three-component version into a 64-bit integer
*