diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-12-26 20:57:17 -0800 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-12-26 20:57:17 -0800 |
| commit | c8166b2db15b692d2c3deba2b7b82343ba478873 (patch) | |
| tree | b418e8a043185f14d321b77ae20e440a230fde28 /node/PacketDecoder.cpp | |
| parent | 54c2c945e00b4da9931bf16c762860886704c6b3 (diff) | |
| download | infinitytier-c8166b2db15b692d2c3deba2b7b82343ba478873.tar.gz infinitytier-c8166b2db15b692d2c3deba2b7b82343ba478873.zip | |
Bump version to 0.6.4 for testing, integrate software updater auto-check into PacketDecoder decode path and main loop.
Diffstat (limited to 'node/PacketDecoder.cpp')
| -rw-r--r-- | node/PacketDecoder.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/node/PacketDecoder.cpp b/node/PacketDecoder.cpp index 1c6d09ca..ca9f18a3 100644 --- a/node/PacketDecoder.cpp +++ b/node/PacketDecoder.cpp @@ -41,6 +41,7 @@ #include "NodeConfig.hpp" #include "Service.hpp" #include "Demarc.hpp" +#include "SoftwareUpdater.hpp" namespace ZeroTier { @@ -265,6 +266,11 @@ bool PacketDecoder::_doOK(const RuntimeEnvironment *_r,const SharedPtr<Peer> &pe unsigned int vRevision = at<uint16_t>(ZT_PROTO_VERB_HELLO__OK__IDX_REVISION); TRACE("%s(%s): OK(HELLO), version %u.%u.%u",source().toString().c_str(),_remoteAddress.toString().c_str(),vMajor,vMinor,vRevision); peer->setRemoteVersion(vMajor,vMinor,vRevision); + + // If a supernode has a version higher than ours, this causes a software + // update check to run now. + if ((_r->updater)&&(_r->topology->isSupernode(peer->address()))) + _r->updater->sawRemoteVersion(vMajor,vMinor,vRevision); } break; case Packet::VERB_WHOIS: { // Right now only supernodes are allowed to send OK(WHOIS) to prevent |
