diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-12-11 13:00:18 -0800 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-12-11 13:00:18 -0800 |
| commit | a22a3ed7e8754fbfb2f48e4a32b79d6b7468e25c (patch) | |
| tree | 5ca1866c35c048d85c1895e3ed7ec5fb8de740e3 /node/SoftwareUpdater.hpp | |
| parent | c5ef502b42f4c4e4a0cc89a1fb7e42cbb8743878 (diff) | |
| download | infinitytier-a22a3ed7e8754fbfb2f48e4a32b79d6b7468e25c.tar.gz infinitytier-a22a3ed7e8754fbfb2f48e4a32b79d6b7468e25c.zip | |
Software update work...
Diffstat (limited to 'node/SoftwareUpdater.hpp')
| -rw-r--r-- | node/SoftwareUpdater.hpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/node/SoftwareUpdater.hpp b/node/SoftwareUpdater.hpp index bfcdf395..5e47bbea 100644 --- a/node/SoftwareUpdater.hpp +++ b/node/SoftwareUpdater.hpp @@ -75,11 +75,25 @@ public: } /** + * Check for updates now regardless of last check time or version + */ + inline void checkNow() + { + Mutex::Lock _l(_lock); + if (_status == UPDATE_STATUS_IDLE) { + _lastUpdateAttempt = Utils::now(); + _status = UPDATE_STATUS_GETTING_NFO; + HttpClient::GET(ZT_DEFAULTS.updateLatestNfoURL,HttpClient::NO_HEADERS,ZT_UPDATE_HTTP_TIMEOUT,&_cbHandleGetLatestVersionInfo,this); + } + } + + /** * Pack three-component version into a 64-bit integer * * @param vmaj Major version (0..65535) * @param vmin Minor version (0..65535) * @param rev Revision (0..65535) + * @return Version packed into an easily comparable 64-bit integer */ static inline uint64_t packVersion(unsigned int vmaj,unsigned int vmin,unsigned int rev) throw() |
