summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2013-09-13 14:41:20 -0400
committerAdam Ierymenko <adam.ierymenko@gmail.com>2013-09-13 14:41:20 -0400
commitf6ad138561a86ee5cac51b10680916967abc7a07 (patch)
tree3bbb8893b5baebd3f2a4455a842f6bca95b8c516
parentd87a1d6b99e8952b4862cf6dc5965f6b5b54bc85 (diff)
downloadinfinitytier-f6ad138561a86ee5cac51b10680916967abc7a07.tar.gz
infinitytier-f6ad138561a86ee5cac51b10680916967abc7a07.zip
Bit more of adding version to OK(HELLO)
-rw-r--r--node/Packet.hpp8
-rw-r--r--node/PacketDecoder.cpp2
2 files changed, 6 insertions, 4 deletions
diff --git a/node/Packet.hpp b/node/Packet.hpp
index 28b7551d..509ef1a4 100644
--- a/node/Packet.hpp
+++ b/node/Packet.hpp
@@ -374,10 +374,10 @@ public:
*
* OK payload:
* <[8] timestamp (echoed from original HELLO)>
- * <[1] protocol version>
- * <[1] software major version>
- * <[1] software minor version>
- * <[2] software revision>
+ * <[1] protocol version (of responder)>
+ * <[1] software major version (of responder)>
+ * <[1] software minor version (of responder)>
+ * <[2] software revision (of responder)>
*
* ERROR has no payload.
*/
diff --git a/node/PacketDecoder.cpp b/node/PacketDecoder.cpp
index 67f70554..3b54bed7 100644
--- a/node/PacketDecoder.cpp
+++ b/node/PacketDecoder.cpp
@@ -273,6 +273,7 @@ bool PacketDecoder::_doHELLO(const RuntimeEnvironment *_r)
SharedPtr<Peer> candidate(new Peer(_r->identity,id));
candidate->setPathAddress(_remoteAddress,false);
+ candidate->setRemoteVersion(vMajor,vMinor,vRevision);
_CBaddPeerFromHello_Data *arg = new _CBaddPeerFromHello_Data;
arg->renv = _r;
@@ -290,6 +291,7 @@ bool PacketDecoder::_doHELLO(const RuntimeEnvironment *_r)
} catch ( ... ) {
TRACE("dropped HELLO from %s(%s): unexpected exception",source().toString().c_str(),_remoteAddress.toString().c_str());
}
+
return true;
}